diff options
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 79b615873838..43e99513334a 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -488,7 +488,12 @@ static struct fuse_conn *new_conn(struct super_block *sb) | |||
488 | err = bdi_init(&fc->bdi); | 488 | err = bdi_init(&fc->bdi); |
489 | if (err) | 489 | if (err) |
490 | goto error_kfree; | 490 | goto error_kfree; |
491 | err = bdi_register_dev(&fc->bdi, fc->dev); | 491 | if (sb->s_bdev) { |
492 | err = bdi_register(&fc->bdi, NULL, "%u:%u-fuseblk", | ||
493 | MAJOR(fc->dev), MINOR(fc->dev)); | ||
494 | } else { | ||
495 | err = bdi_register_dev(&fc->bdi, fc->dev); | ||
496 | } | ||
492 | if (err) | 497 | if (err) |
493 | goto error_bdi_destroy; | 498 | goto error_bdi_destroy; |
494 | /* | 499 | /* |
@@ -576,6 +581,8 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) | |||
576 | fc->no_lock = 1; | 581 | fc->no_lock = 1; |
577 | if (arg->flags & FUSE_ATOMIC_O_TRUNC) | 582 | if (arg->flags & FUSE_ATOMIC_O_TRUNC) |
578 | fc->atomic_o_trunc = 1; | 583 | fc->atomic_o_trunc = 1; |
584 | if (arg->flags & FUSE_BIG_WRITES) | ||
585 | fc->big_writes = 1; | ||
579 | } else { | 586 | } else { |
580 | ra_pages = fc->max_read / PAGE_CACHE_SIZE; | 587 | ra_pages = fc->max_read / PAGE_CACHE_SIZE; |
581 | fc->no_lock = 1; | 588 | fc->no_lock = 1; |
@@ -599,7 +606,8 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req) | |||
599 | arg->major = FUSE_KERNEL_VERSION; | 606 | arg->major = FUSE_KERNEL_VERSION; |
600 | arg->minor = FUSE_KERNEL_MINOR_VERSION; | 607 | arg->minor = FUSE_KERNEL_MINOR_VERSION; |
601 | arg->max_readahead = fc->bdi.ra_pages * PAGE_CACHE_SIZE; | 608 | arg->max_readahead = fc->bdi.ra_pages * PAGE_CACHE_SIZE; |
602 | arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC; | 609 | arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC | |
610 | FUSE_BIG_WRITES; | ||
603 | req->in.h.opcode = FUSE_INIT; | 611 | req->in.h.opcode = FUSE_INIT; |
604 | req->in.numargs = 1; | 612 | req->in.numargs = 1; |
605 | req->in.args[0].size = sizeof(*arg); | 613 | req->in.args[0].size = sizeof(*arg); |