函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\splice.c Create Date:2022-07-29 10:42:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:iter_to_pipe

函数原型:static int iter_to_pipe(struct iov_iter *from, struct pipe_inode_info *pipe, unsigned flags)

返回类型:int

参数:

类型参数名称
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 iov_iter_count(from)且非failed循环
1239  copied等于iov_iter_get_pages(from, pages, ~0UL, 16, & start)
1240  如果copied小于等于0则
1241  ret等于copied
1242  退出
1245 copied循环
1247  如果非failed
1248  page等于pages[n]
1249  offset等于start
1250  len等于size
1251  ret等于add_to_pipe(pipe, & buf)
1253  failed = true
1254  否则
1256  total加等于ret
1258  否则
1261  copied减等于size
1264  返回:如果totaltotal否则ret
调用者
名称描述
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.