Function report |
Source Code:fs\splice.c |
Create Date:2022-07-28 20:11:27 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Determine where to splice to/from.
Proto:static long do_splice(struct file *in, loff_t __user *off_in, struct file *out, loff_t __user *off_out, size_t len, unsigned int flags)
Type:long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | in | |
| loff_t __user * | off_in | |
| struct file * | out | |
| loff_t __user * | off_out | |
| size_t | len | |
| unsigned int | flags |
| 1121 | ipipe = After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same* location, so checking ->i_pipe is not enough to verify that this is a* pipe. |
| 1122 | opipe = After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same* location, so checking ->i_pipe is not enough to verify that this is a* pipe. |
| 1128 | If Not (f_mode & le is open for reading ) Then Return -EBADF |
| 1131 | If Not (f_mode & le is open for writing ) Then Return -EBADF |
| 1138 | If (f_flags | f_flags) & O_NONBLOCK Then flags |= don't block on the pipe splicing (but |
| 1141 | Return splice_pipe_to_pipe(ipipe, opipe, len, flags) |
| 1144 | If ipipe Then |
| 1147 | If off_out Then |
| 1148 | If Not (f_mode & le can be accessed using pwrite ) Then Return -EINVAL |
| 1152 | Else |
| 1156 | If Value for the false possibility is greater at compile time(!(f_mode & le is open for writing )) Then Return -EBADF |
| 1159 | If Value for the false possibility is greater at compile time(f_flags & O_APPEND) Then Return -EINVAL |
| 1163 | If Value for the false possibility is greater at compile time(ret < 0) Then Return ret |
| 1166 | If f_flags & O_NONBLOCK Then flags |= don't block on the pipe splicing (but |
| 1169 | file_start_write(out) |
| 1171 | file_end_write(out) |
| 1178 | Return ret |
| 1181 | If opipe Then |
| 1184 | If off_in Then |
| 1185 | If Not (f_mode & le can be accessed using pread ) Then Return -EINVAL |
| 1189 | Else |
| 1193 | If f_flags & O_NONBLOCK Then flags |= don't block on the pipe splicing (but |
| 1197 | ret = wait_for_space(opipe, flags) |
| 1198 | If Not ret Then |
| 1202 | p_space = max_usage - pipe_occupancy - Return number of slots used in the pipe*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer |
| 1207 | pipe_unlock(opipe) |
| 1208 | If ret > 0 Then wakeup_pipe_readers(opipe) |
| 1215 | Return ret |
| 1218 | Return -EINVAL |
| Name | Describe |
|---|---|
| SYSCALL_DEFINE6 |
| 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 |