Function report |
Source Code:fs\splice.c |
Create Date:2022-07-28 20:11:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:r_file_splice_write - splice data from a pipe to a file*@pipe: pipe info*@out: file to write to*@ppos: position in @out*@len: number of bytes to splice*@flags: splice modifier flags* Description:* Will either move or copy pages (determined by @flags
Proto:ssize_t iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
struct pipe_inode_info * | pipe | |
struct file * | out | |
loff_t * | ppos | |
size_t | len | |
unsigned int | flags |
695 | struct splice_desc sd = {maining length = len, splice flags = flags, le position = * ppos, le to read/write = out, } |
702 | array = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
706 | If Value for the false possibility is greater at compile time(!array) Then Return -ENOMEM |
712 | When maining length cycle |
719 | If ret <= 0 Then Break |
725 | array = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
727 | If Not array Then |
738 | left = maining length |
759 | iov_iter_bvec( & from, WRITE, array, n, maining length - left) |
760 | ret = vfs_iter_write(out, & from, & le position , 0) |
761 | If ret <= 0 Then Break |
765 | maining length -= ret |
766 | ppos = le position |
780 | Else |
787 | done : |
791 | pipe_unlock(pipe) |
793 | If umber of bytes already spliced Then ret = umber of bytes already spliced |
796 | Return ret |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |