Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188602
b: refs/heads/master
c: 859e7b1
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Nov 2, 2009
1 parent 9b7f75c commit 4c4770b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33aa96e7430d215e2ee779f65cdad0f6d4571fe1
refs/heads/master: 859e7b149362475672e2a996f29b8f45cbb34d82
15 changes: 9 additions & 6 deletions trunk/fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,14 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
client->signed_ticket = NULL;
client->signed_ticket_len = 0;

err = bdi_init(&client->backing_dev_info);
if (err < 0)
goto fail;

err = -ENOMEM;
client->wb_wq = create_workqueue("ceph-writeback");
if (client->wb_wq == NULL)
goto fail;
goto fail_bdi;
client->pg_inv_wq = create_singlethread_workqueue("ceph-pg-invalid");
if (client->pg_inv_wq == NULL)
goto fail_wb_wq;
Expand All @@ -537,6 +541,8 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
destroy_workqueue(client->pg_inv_wq);
fail_wb_wq:
destroy_workqueue(client->wb_wq);
fail_bdi:
bdi_destroy(&client->backing_dev_info);
fail:
kfree(client);
return ERR_PTR(err);
Expand Down Expand Up @@ -774,13 +780,10 @@ static int ceph_compare_super(struct super_block *sb, void *data)
/*
* construct our own bdi so we can control readahead, etc.
*/
static int ceph_init_bdi(struct super_block *sb, struct ceph_client *client)
static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client)
{
int err;

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? */
Expand Down Expand Up @@ -840,7 +843,7 @@ static int ceph_get_sb(struct file_system_type *fs_type,
if (!client->wb_pagevec_pool)
goto out_splat;

err = ceph_init_bdi(sb, client);
err = ceph_register_bdi(sb, client);
if (err < 0)
goto out_splat;
}
Expand Down

0 comments on commit 4c4770b

Please sign in to comment.