diff options
-rw-r--r-- | fs/fuse/inode.c | 5 | ||||
-rw-r--r-- | include/linux/fuse.h | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index e69a546844d0..3b928a02af04 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -218,6 +218,7 @@ static void convert_fuse_statfs(struct kstatfs *stbuf, struct fuse_kstatfs *attr | |||
218 | { | 218 | { |
219 | stbuf->f_type = FUSE_SUPER_MAGIC; | 219 | stbuf->f_type = FUSE_SUPER_MAGIC; |
220 | stbuf->f_bsize = attr->bsize; | 220 | stbuf->f_bsize = attr->bsize; |
221 | stbuf->f_frsize = attr->frsize; | ||
221 | stbuf->f_blocks = attr->blocks; | 222 | stbuf->f_blocks = attr->blocks; |
222 | stbuf->f_bfree = attr->bfree; | 223 | stbuf->f_bfree = attr->bfree; |
223 | stbuf->f_bavail = attr->bavail; | 224 | stbuf->f_bavail = attr->bavail; |
@@ -238,10 +239,12 @@ static int fuse_statfs(struct super_block *sb, struct kstatfs *buf) | |||
238 | if (!req) | 239 | if (!req) |
239 | return -EINTR; | 240 | return -EINTR; |
240 | 241 | ||
242 | memset(&outarg, 0, sizeof(outarg)); | ||
241 | req->in.numargs = 0; | 243 | req->in.numargs = 0; |
242 | req->in.h.opcode = FUSE_STATFS; | 244 | req->in.h.opcode = FUSE_STATFS; |
243 | req->out.numargs = 1; | 245 | req->out.numargs = 1; |
244 | req->out.args[0].size = sizeof(outarg); | 246 | req->out.args[0].size = |
247 | fc->minor < 4 ? FUSE_COMPAT_STATFS_SIZE : sizeof(outarg); | ||
245 | req->out.args[0].value = &outarg; | 248 | req->out.args[0].value = &outarg; |
246 | request_send(fc, req); | 249 | request_send(fc, req); |
247 | err = req->out.h.error; | 250 | err = req->out.h.error; |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 3c85f1a422cc..9d5177c356cc 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -53,6 +53,9 @@ struct fuse_kstatfs { | |||
53 | __u64 ffree; | 53 | __u64 ffree; |
54 | __u32 bsize; | 54 | __u32 bsize; |
55 | __u32 namelen; | 55 | __u32 namelen; |
56 | __u32 frsize; | ||
57 | __u32 padding; | ||
58 | __u32 spare[6]; | ||
56 | }; | 59 | }; |
57 | 60 | ||
58 | #define FATTR_MODE (1 << 0) | 61 | #define FATTR_MODE (1 << 0) |
@@ -213,6 +216,8 @@ struct fuse_write_out { | |||
213 | __u32 padding; | 216 | __u32 padding; |
214 | }; | 217 | }; |
215 | 218 | ||
219 | #define FUSE_COMPAT_STATFS_SIZE 48 | ||
220 | |||
216 | struct fuse_statfs_out { | 221 | struct fuse_statfs_out { |
217 | struct fuse_kstatfs st; | 222 | struct fuse_kstatfs st; |
218 | }; | 223 | }; |