• M
    splice: split up __splice_from_pipe() · b3c2d2dd
    Miklos Szeredi 提交于
    Split up __splice_from_pipe() into four helper functions:
    
      splice_from_pipe_begin()
      splice_from_pipe_next()
      splice_from_pipe_feed()
      splice_from_pipe_end()
    
    splice_from_pipe_next() will wait (if necessary) for more buffers to
    be added to the pipe.  splice_from_pipe_feed() will feed the buffers
    to the supplied actor and return when there's no more data available
    (or if all of the requested data has been copied).
    
    This is necessary so that implementations can do locking around the
    non-waiting splice_from_pipe_feed().
    
    This patch should not cause any change in behavior.
    Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
    b3c2d2dd
splice.c 41.8 KB