From: Miklos Szeredi Date: Thu, 19 May 2011 13:09:43 +0000 (+0200) Subject: Fix splice_read X-Git-Tag: fuse_2_9_0~45 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9c526a7a54b90608463380deffe94e1c9d17db15;p=qemu-gpiodev%2Flibfuse.git Fix splice_read --- diff --git a/include/fuse_common.h b/include/fuse_common.h index 569c826..0c4c1d4 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -92,6 +92,7 @@ struct fuse_file_info { * FUSE_CAP_DONT_MASK: don't apply umask to file mode on create operations * FUSE_CAP_SPLICE_WRITE: ability to use splice() to write to the fuse device * FUSE_CAP_SPLICE_MOVE: ability to move data to the fuse device with splice() + * FUSE_CAP_SPLICE_READ: ability to use splice() to read from the fuse device */ #define FUSE_CAP_ASYNC_READ (1 << 0) #define FUSE_CAP_POSIX_LOCKS (1 << 1) diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 1715e2e1..55bce2b 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -1601,8 +1601,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) f->conn.want |= FUSE_CAP_SPLICE_WRITE; if (f->splice_move) f->conn.want |= FUSE_CAP_SPLICE_MOVE; - if (f->splice_read && - (f->op.write_buf || f->op.retrieve_reply)) + if (f->splice_read) f->conn.want |= FUSE_CAP_SPLICE_READ; }