函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:splice_direct_to_actor - splices data directly between two non-pipes*@in: file to splice from*@sd: actor information on where to splice to*@actor: handles the data splicing* Description:* This is a special case helper to splice directly between two

函数原型:ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, splice_direct_actor *actor)

返回类型:ssize_t

参数:

类型参数名称
struct file *in
struct splice_desc *sd
splice_direct_actor *actor
922  i_mode等于i_mode
923  如果此条件成立可能性小(为编译器优化)(!S_ISREG(i_mode) && !S_ISBLK(i_mode))则返回:负EINVAL
930  pipe等于splice_pipe
931  如果此条件成立可能性小(为编译器优化)(!pipe)则
932  pipe等于alloc_pipe_info()
933  如果非pipe则返回:负ENOMEM
941  readers等于1
943  splice_pipe等于pipe
949  ret等于0
950  bytes等于0
951  len等于maining length
952  flags等于splice flags
957  splice flags 与等于don't block on the pipe splicing (but 的反
958  more等于splice flags 按位与xpect more data
960  WARN_ON_ONCE(!pipe_empty - Return true if the pipe is empty*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer)
962 len循环
965  pos等于le position , prev_pos等于pos
968  p_space等于max_usagepipe_occupancy - Return number of slots used in the pipe*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer
970  read_len等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, len, p_space << PAGE_SHIFT determines the page size )
971  ret等于Attempt to initiate a splice from a file to a pipe.
972  如果此条件成立可能性小(为编译器优化)(ret <= 0)则转到:out_release
975  read_len等于ret
976  maining length 等于read_len
983  如果read_len小于lensplice flags 或等于xpect more data
985  否则如果非moresplice flags 与等于xpect more data 的反
992  ret等于actor(pipe, sd)
994  le position 等于prev_pos
995  转到:out_release
998  bytes加等于ret
999  len减等于ret
1000  le position 等于pos
1002  如果ret小于read_len
1003  le position 等于prev_posret
1004  转到:out_release
1008  done :
1009  tail等于head等于0
1010  file_accessed(in)
1011  返回:bytes
1013  out_release :
1018 i小于ring_size循环
1019  buf等于bufs[i]
1021  如果opspipe_buf_release - put a reference to a pipe_buffer*@pipe: the pipe that the buffer belongs to*@buf: the buffer to put a reference to
1025  如果非bytesbytes等于ret
1028  转到:done
调用者
名称描述
do_splice_directdo_splice_direct - splices data directly between two files*@in: file to splice from*@ppos: input file offset*@out: file to splice to*@opos: output file offset*@len: number of bytes to splice*@flags: splice modifier flags* Description: