• I
    [PATCH] splice: add optional input and output offsets · 529565dc
    Ingo Molnar 提交于
    add optional input and output offsets to sys_splice(), for seekable file
    descriptors:
    
     asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
                                int fd_out, loff_t __user *off_out,
                                size_t len, unsigned int flags);
    
    semantics are straightforward: f_pos will be updated with the offset
    provided by user-space, before the splice transfer is about to begin.
    Providing a NULL offset pointer means the existing f_pos will be used
    (and updated in situ).  Providing an offset for a pipe results in
    -ESPIPE. Providing an invalid offset pointer results in -EFAULT.
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    Signed-off-by: NJens Axboe <axboe@suse.de>
    529565dc
splice.c 18.0 KB