diff options
| -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);  | 
