diff options
author | Csaba Henk <csaba@redhat.com> | 2016-09-19 03:58:15 +0200 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-09-22 22:34:05 -0700 |
commit | 3bfdcdcdfa04a12483a490fb6f766fd6689663a9 (patch) | |
tree | 3d4cf28882805ef564a7f335d6ff0be2c67a64ff /xlators/mount | |
parent | 9d7d81e8058aa89fc24bcc211cfad3618720292d (diff) |
fuse: fix fuse dumping for FUSE_WRITE
Data coming with FUSE_WRITE requests are arranged
with a special alignment, cf. 15d85ff1. fuse_dumper()
was not aware of this and didn't dump the proper
reqion for FUSE_WRITE.
BUG: 1377427
Signed-off-by: Csaba Henk <csaba@redhat.com>
Change-Id: I36255ca3336e95be6e2d256c8199761ddec41869
Reviewed-on: http://review.gluster.org/15525
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index a79f7497acf..5426fa37d07 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -5424,8 +5424,13 @@ fuse_dumper (xlator_t *this, fuse_in_header_t *finh, void *msg) diov[0].iov_len = 1; diov[1].iov_base = finh; diov[1].iov_len = sizeof (*finh); + if (finh->opcode == FUSE_WRITE) { + /* WRITE has special data alingment, see comment in + fuse_write(). */ + diov[1].iov_len += sizeof (struct fuse_write_in); + } diov[2].iov_base = msg; - diov[2].iov_len = finh->len - sizeof (*finh); + diov[2].iov_len = finh->len - diov[1].iov_len; pthread_mutex_lock (&priv->fuse_dump_mutex); ret = sys_writev (priv->fuse_dump_fd, diov, 3); |