diff options
author | Sage Weil <sage@newdream.net> | 2010-05-04 19:39:35 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 18:25:30 -0400 |
commit | 31e0cf8f6a1488b6ca69dcdceeaed107ecfd6463 (patch) | |
tree | 4562632f7bed0a611a523b6f8cd0ca137122bbce /fs/ceph/super.c | |
parent | 56b7cf9581fa0486657102a6fb8efabc3eadeba1 (diff) |
ceph: name bdi ceph-%d instead of major:minor
The bdi_setup_and_register() helper doesn't help us since we bdi_init() in
create_client() and bdi_register() only when sget() succeeds.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 34b16cb302fe..7f5b20dc4945 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -910,6 +910,8 @@ static int ceph_compare_super(struct super_block *sb, void *data) | |||
910 | /* | 910 | /* |
911 | * construct our own bdi so we can control readahead, etc. | 911 | * construct our own bdi so we can control readahead, etc. |
912 | */ | 912 | */ |
913 | static atomic_long_t bdi_seq = ATOMIC_INIT(0); | ||
914 | |||
913 | static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client) | 915 | static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client) |
914 | { | 916 | { |
915 | int err; | 917 | int err; |
@@ -919,7 +921,8 @@ static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client) | |||
919 | client->backing_dev_info.ra_pages = | 921 | client->backing_dev_info.ra_pages = |
920 | (client->mount_args->rsize + PAGE_CACHE_SIZE - 1) | 922 | (client->mount_args->rsize + PAGE_CACHE_SIZE - 1) |
921 | >> PAGE_SHIFT; | 923 | >> PAGE_SHIFT; |
922 | err = bdi_register_dev(&client->backing_dev_info, sb->s_dev); | 924 | err = bdi_register(&client->backing_dev_info, NULL, "ceph-%d", |
925 | atomic_long_inc_return(&bdi_seq)); | ||
923 | if (!err) | 926 | if (!err) |
924 | sb->s_bdi = &client->backing_dev_info; | 927 | sb->s_bdi = &client->backing_dev_info; |
925 | return err; | 928 | return err; |