diff options
Diffstat (limited to 'xlators/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 13 | ||||
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 6537c0bcc83..1da2dcdb223 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -1902,7 +1902,7 @@ fuse_readv_resume (fuse_state_t *state) state->finh->unique, state->fd, state->size, state->off); FUSE_FOP (state, fuse_readv_cbk, GF_FOP_READ, - readv, state->fd, state->size, state->off); + readv, state->fd, state->size, state->off, state->io_flags); } static void @@ -1930,6 +1930,8 @@ fuse_readv (xlator_t *this, fuse_in_header_t *finh, void *msg) state->size = fri->size; state->off = fri->offset; + /* lets ignore 'fri->read_flags', but just consider 'fri->flags' */ + state->io_flags = fri->flags; fuse_resolve_and_resume (state, fuse_readv_resume); } @@ -1995,7 +1997,7 @@ fuse_write_resume (fuse_state_t *state) state->finh->unique, state->fd, state->size, state->off); FUSE_FOP (state, fuse_writev_cbk, GF_FOP_WRITE, writev, state->fd, - &state->vector, 1, state->off, iobref); + &state->vector, 1, state->off, state->io_flags, iobref); iobref_unref (iobref); } @@ -2021,6 +2023,13 @@ fuse_write (xlator_t *this, fuse_in_header_t *finh, void *msg) state->size = fwi->size; state->off = fwi->offset; + /* lets ignore 'fwi->write_flags', but just consider 'fwi->flags' */ + state->io_flags = fwi->flags; + /* TODO: may need to handle below flag + (fwi->write_flags & FUSE_WRITE_CACHE); + */ + + fuse_resolve_fd_init (state, &state->resolve, fd); /* See comment by similar code in fuse_settatr */ diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h index 489e6d6456d..d9783f2e054 100644 --- a/xlators/mount/fuse/src/fuse-bridge.h +++ b/xlators/mount/fuse/src/fuse-bridge.h @@ -292,6 +292,7 @@ typedef struct { struct iovec vector; uuid_t gfid; + uint32_t io_flags; } fuse_state_t; typedef struct fuse_fd_ctx { |