• Miklos Szeredi's avatar
    fuse: support splice() reading from fuse device · c3021629
    Miklos Szeredi authored
    Allow userspace filesystem implementation to use splice() to read from
    the fuse device.
    
    The userspace filesystem can now transfer data coming from a WRITE
    request to an arbitrary file descriptor (regular file, block device or
    socket) without having to go through a userspace buffer.
    
    The semantics of using splice() to read messages are:
    
     1)  with a single splice() call move the whole message from the fuse
         device to a temporary pipe
     2)  read the header from the pipe and determine the message type
     3a) if message is a WRITE then splice data from pipe to destination
     3b) else read rest of message to userspace buffer
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    c3021629
dev.c 37.4 KB