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:iter_to_pipe

Proto:static int iter_to_pipe(struct iov_iter *from, struct pipe_inode_info *pipe, unsigned flags)

Type:int

Parameter:

TypeParameterName
struct iov_iter *from
struct pipe_inode_info *pipe
unsignedflags
1225  struct pipe_buffer buf = {ops = & user_page_pipe_buf_ops, flags = flags}
1229  total = 0
1230  ret = 0
1231  bool failed = false
1233  When iov_iter_count(from) && Not failed cycle
1239  copied = iov_iter_get_pages(from, pages, ~0UL, 16, & start)
1240  If copied <= 0 Then
1241  ret = copied
1242  Break
1245  When copied cycle
1247  If Not failed Then
1248  page = pages[n]
1249  offset = start
1250  len = size
1251  ret = add_to_pipe(pipe, & buf)
1253  failed = true
1254  Else
1256  total += ret
1258  Else
1261  copied -= size
1264  Return If total Then total Else ret
Caller
NameDescribe
vmsplice_to_pipevmsplice splices a user address range into a pipe. It can be thought of* as splice-from-memory, where the regular splice is splice-from-file (or* to file). In both cases the output is a pipe, naturally.