summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorSage Weil2009-10-14 23:09:07 +0200
committerSage Weil2009-10-14 23:09:07 +0200
commitf2cf418cec8d61df0651a0140a92a8c75246e14f (patch)
tree606533d3b5a41d75e6e1954aae1de94ef85df58b /fs/ceph/super.c
parentceph: convert encode/decode macros to inlines (diff)
downloadkernel-qcow2-linux-f2cf418cec8d61df0651a0140a92a8c75246e14f.tar.gz
kernel-qcow2-linux-f2cf418cec8d61df0651a0140a92a8c75246e14f.tar.xz
kernel-qcow2-linux-f2cf418cec8d61df0651a0140a92a8c75246e14f.zip
ceph: initialize sb->s_bdi, bdi_unregister after kill_anon_super
Writeback doesn't work without the bdi set, and writeback on umount doesn't work if we unregister the bdi too early. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 442a9900317e..7f7d4759a443 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -97,6 +97,7 @@ static int ceph_syncfs(struct super_block *sb, int wait)
dout("sync_fs %d\n", wait);
ceph_osdc_sync(&ceph_client(sb)->osdc);
ceph_mdsc_sync(&ceph_client(sb)->mdsc);
+ dout("sync_fs %d done\n", wait);
return 0;
}
@@ -777,6 +778,7 @@ static int ceph_init_bdi(struct super_block *sb, struct ceph_client *client)
err = bdi_init(&client->backing_dev_info);
if (err < 0)
return err;
+ sb->s_bdi = &client->backing_dev_info;
/* set ra_pages based on rsize mount option? */
if (client->mount_args.rsize >= PAGE_CACHE_SIZE)
@@ -861,8 +863,8 @@ static void ceph_kill_sb(struct super_block *s)
struct ceph_client *client = ceph_sb_to_client(s);
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(&client->mdsc);
- bdi_unregister(&client->backing_dev_info);
kill_anon_super(s); /* will call put_super after sb is r/o */
+ bdi_unregister(&client->backing_dev_info);
bdi_destroy(&client->backing_dev_info);
ceph_destroy_client(client);
}