Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188624
b: refs/heads/master
c: b9bfb93
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Nov 19, 2009
1 parent b977ebc commit 681b9c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 4e7a5dcd1bbab6560fbc8ada29a840e7a20ed7bc
refs/heads/master: b9bfb93ce2b1ef668254f0b9e16fcc5246d65d8e
23 changes: 12 additions & 11 deletions trunk/fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,18 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
if (client->trunc_wq == NULL)
goto fail_pg_inv_wq;

/* set up mempools */
err = -ENOMEM;
client->wb_pagevec_pool = mempool_create_kmalloc_pool(10,
client->mount_args->wsize >> PAGE_CACHE_SHIFT);
if (!client->wb_pagevec_pool)
goto fail_trunc_wq;


/* subsystems */
err = ceph_monc_init(&client->monc, client);
if (err < 0)
goto fail_trunc_wq;
goto fail_mempool;
err = ceph_osdc_init(&client->osdc, client);
if (err < 0)
goto fail_monc;
Expand All @@ -550,6 +558,8 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
ceph_osdc_stop(&client->osdc);
fail_monc:
ceph_monc_stop(&client->monc);
fail_mempool:
mempool_destroy(client->wb_pagevec_pool);
fail_trunc_wq:
destroy_workqueue(client->trunc_wq);
fail_pg_inv_wq:
Expand Down Expand Up @@ -581,8 +591,7 @@ static void ceph_destroy_client(struct ceph_client *client)

if (client->msgr)
ceph_messenger_destroy(client->msgr);
if (client->wb_pagevec_pool)
mempool_destroy(client->wb_pagevec_pool);
mempool_destroy(client->wb_pagevec_pool);

destroy_mount_args(client->mount_args);

Expand Down Expand Up @@ -845,14 +854,6 @@ static int ceph_get_sb(struct file_system_type *fs_type,
dout("get_sb got existing client %p\n", client);
} else {
dout("get_sb using new client %p\n", client);

/* set up mempools */
err = -ENOMEM;
client->wb_pagevec_pool = mempool_create_kmalloc_pool(10,
client->mount_args->wsize >> PAGE_CACHE_SHIFT);
if (!client->wb_pagevec_pool)
goto out_splat;

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

0 comments on commit 681b9c7

Please sign in to comment.