aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-10-14 17:09:07 -0400
committerSage Weil <sage@newdream.net>2009-10-14 17:09:07 -0400
commitf2cf418cec8d61df0651a0140a92a8c75246e14f (patch)
tree606533d3b5a41d75e6e1954aae1de94ef85df58b /fs/ceph/super.c
parentc89136ea4253c73e89e97f5138bb22d97ad9f564 (diff)
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)
97 dout("sync_fs %d\n", wait); 97 dout("sync_fs %d\n", wait);
98 ceph_osdc_sync(&ceph_client(sb)->osdc); 98 ceph_osdc_sync(&ceph_client(sb)->osdc);
99 ceph_mdsc_sync(&ceph_client(sb)->mdsc); 99 ceph_mdsc_sync(&ceph_client(sb)->mdsc);
100 dout("sync_fs %d done\n", wait);
100 return 0; 101 return 0;
101} 102}
102 103
@@ -777,6 +778,7 @@ static int ceph_init_bdi(struct super_block *sb, struct ceph_client *client)
777 err = bdi_init(&client->backing_dev_info); 778 err = bdi_init(&client->backing_dev_info);
778 if (err < 0) 779 if (err < 0)
779 return err; 780 return err;
781 sb->s_bdi = &client->backing_dev_info;
780 782
781 /* set ra_pages based on rsize mount option? */ 783 /* set ra_pages based on rsize mount option? */
782 if (client->mount_args.rsize >= PAGE_CACHE_SIZE) 784 if (client->mount_args.rsize >= PAGE_CACHE_SIZE)
@@ -861,8 +863,8 @@ static void ceph_kill_sb(struct super_block *s)
861 struct ceph_client *client = ceph_sb_to_client(s); 863 struct ceph_client *client = ceph_sb_to_client(s);
862 dout("kill_sb %p\n", s); 864 dout("kill_sb %p\n", s);
863 ceph_mdsc_pre_umount(&client->mdsc); 865 ceph_mdsc_pre_umount(&client->mdsc);
864 bdi_unregister(&client->backing_dev_info);
865 kill_anon_super(s); /* will call put_super after sb is r/o */ 866 kill_anon_super(s); /* will call put_super after sb is r/o */
867 bdi_unregister(&client->backing_dev_info);
866 bdi_destroy(&client->backing_dev_info); 868 bdi_destroy(&client->backing_dev_info);
867 ceph_destroy_client(client); 869 ceph_destroy_client(client);
868} 870}