diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2010-11-08 17:11:46 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2010-11-08 17:11:46 +0100 |
commit | 4e0aea6a96146115e2fb3b8c4a4c75325ad894d7 (patch) | |
tree | ddccccd975def8b0881dbd4b219a931a03ffd227 /lib/fuse_i.h | |
parent | 7d878eb13a9b1e0e1a428c1ead2733b8453a3bb7 (diff) | |
download | libfuse-4e0aea6a96146115e2fb3b8c4a4c75325ad894d7.tar.gz |
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.
Diffstat (limited to 'lib/fuse_i.h')
-rw-r--r-- | lib/fuse_i.h | 7 |
1 files changed, 7 insertions, 0 deletions
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; |