Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\splice.c Create Date:2022-07-28 20:11:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:For lack of a better implementation, implement vmsplice() to userspace* as a simple copy of the pipes pages to the user iov.

Proto:static long vmsplice_to_user(struct file *file, struct iov_iter *iter, unsigned int flags)

Type:long

Parameter:

TypeParameterName
struct file *file
struct iov_iter *iter
unsigned intflags
1281  pipe = After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same* location, so checking ->i_pipe is not enough to verify that this is a* pipe.
1282  struct splice_desc sd = {maining length = iov_iter_count(iter), splice flags = flags, cookie = iter}
1287  ret = 0
1289  If Not pipe Then Return -EBADF
1292  If maining length Then
1293  pipe_lock(pipe)
1294  ret = __splice_from_pipe - splice data from a pipe to given actor*@pipe: pipe to splice from*@sd: information to @actor*@actor: handler that splices the data* Description:* This function does little more than loop over the pipe and call*@actor to do the actual
1295  pipe_unlock(pipe)
1298  Return ret
Caller
NameDescribe
do_vmspliceNote that vmsplice only really supports true splicing _from_ user memory* to a pipe, not the other way around. Splicing from user memory is a simple* operation that can be supported without any funky alignment restrictions* or nasty vm tricks