Function report |
Source Code:kernel\relay.c |
Create Date:2022-07-28 11:47:39 |
| Last Modify:2020-03-17 19:20:22 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:subbuf_splice_actor - splice up to one subbuf's worth of data
Proto:static ssize_t subbuf_splice_actor(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags, int *nonpad_ret)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | in | |
| loff_t * | ppos | |
| struct pipe_inode_info * | pipe | |
| size_t | len | |
| unsigned int | flags | |
| int * | nonpad_ret |
| 1202 | subbuf_size = sub-buffer size |
| 1206 | read_subbuf = read_start / subbuf_size |
| 1208 | nonpad_end = read_subbuf * subbuf_size + subbuf_size - padding |
| 1221 | If count of sub-buffers produced == count of sub-buffers consumed Then Return 0 |
| 1223 | If r dynamic pipe sizing Then Return -ENOMEM |
| 1229 | If len > subbuf_size - read_start % subbuf_size Then len = subbuf_size - read_start % subbuf_size |
| 1233 | pidx = read_start / PAGE_SIZE % subbuf_pages |
| 1234 | poff = read_start & ~PAGE_MASK |
| 1235 | nr_pages = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedint, subbuf_pages, pages[] & partial[] arrays size ) |
| 1237 | When umber of populated pages in map < nr_pages cycle |
| 1239 | cur_pos = read_start + total_len |
| 1241 | If Not len Then Break |
| 1244 | this_len = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedlong, len, PAGE_SIZE - poff) |
| 1251 | If this_end >= nonpad_end Then |
| 1260 | poff = 0 |
| 1261 | pidx = (pidx + 1) % subbuf_pages |
| 1263 | If this_end >= nonpad_end Then |
| 1264 | umber of populated pages in map ++ |
| 1265 | Break |
| 1269 | ret = 0 |
| 1270 | If Not umber of populated pages in map Then Go to out |
| 1277 | If read_start + ret == nonpad_end Then ret += padding |
| 1280 | out : |
| 1281 | splice_shrink_spd( & spd) |
| 1282 | Return ret |
| Name | Describe |
|---|---|
| relay_file_splice_read |
| 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 |