Commit 31e0cf8f authored by Sage Weil's avatar Sage Weil

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: default avatarSage Weil <sage@newdream.net>
parent 56b7cf95
...@@ -910,6 +910,8 @@ static int ceph_compare_super(struct super_block *sb, void *data) ...@@ -910,6 +910,8 @@ static int ceph_compare_super(struct super_block *sb, void *data)
/* /*
* construct our own bdi so we can control readahead, etc. * construct our own bdi so we can control readahead, etc.
*/ */
static atomic_long_t bdi_seq = ATOMIC_INIT(0);
static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client) static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client)
{ {
int err; int err;
...@@ -919,7 +921,8 @@ static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client) ...@@ -919,7 +921,8 @@ static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client)
client->backing_dev_info.ra_pages = client->backing_dev_info.ra_pages =
(client->mount_args->rsize + PAGE_CACHE_SIZE - 1) (client->mount_args->rsize + PAGE_CACHE_SIZE - 1)
>> PAGE_SHIFT; >> PAGE_SHIFT;
err = bdi_register_dev(&client->backing_dev_info, sb->s_dev); err = bdi_register(&client->backing_dev_info, NULL, "ceph-%d",
atomic_long_inc_return(&bdi_seq));
if (!err) if (!err)
sb->s_bdi = &client->backing_dev_info; sb->s_bdi = &client->backing_dev_info;
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment