From 4e0aea6a96146115e2fb3b8c4a4c75325ad894d7 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 8 Nov 2010 17:11:46 +0100 Subject: libfuse: support zero copy writes in lowlevel interface Add new ->write_buf() method to low level interface. This allows passig a generic buffer, either containing a memory buffer or a file descriptor. This allows implementing zero copy writes. Add fuse_session_receive_buf() and fuse_session_process_buf() which may be used in event loop implementations to replace fuse_chan_recv() and fuse_session_process() respectively. --- lib/fuse_i.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/fuse_i.h') diff --git a/lib/fuse_i.h b/lib/fuse_i.h index 0206336..6d10b1c 100644 --- a/lib/fuse_i.h +++ b/lib/fuse_i.h @@ -15,6 +15,12 @@ struct fuse_ll; struct fuse_session { struct fuse_session_ops op; + int (*receive_buf)(struct fuse_session *se, struct fuse_buf *buf, + struct fuse_chan **chp); + + void (*process_buf)(void *data, const struct fuse_buf *buf, + struct fuse_chan *ch); + void *data; volatile int exited; @@ -51,6 +57,7 @@ struct fuse_ll { int big_writes; int no_splice_write; int no_splice_move; + int no_splice_read; struct fuse_lowlevel_ops op; int got_init; struct cuse_data *cuse_data; -- cgit v1.2.3