Closed dotnwat closed 9 years ago
Originally I thought this was the call for doing zero-copy reads. Actually it is just the normal read but with a different reply. So, this issue can be closed as the use of zero-copy will be looked into during optimization phase. Here is an example:
static void lo_read(fuse_req_t req, fuse_ino_t ino, size_t size,
off_t offset, struct fuse_file_info *fi)
{
struct fuse_bufvec buf = FUSE_BUFVEC_INIT(size);
(void) ino;
buf.buf[0].flags = FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK;
buf.buf[0].fd = fi->fh;
buf.buf[0].pos = offset;
fuse_reply_data(req, &buf, FUSE_BUF_SPLICE_MOVE);
}
There doesn't seem to be any examples (check the fuse examples, there is something there to look at at least for some pointers). Add the retreive_reply and print out the parameters for a simple
cat
call and start figuring out how this works.