aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-08-09 12:41:59 -0400
committerSage Weil <sage@newdream.net>2011-10-25 19:10:15 -0400
commit6ab00d465a1c8c02c2216f8220727282f3aa50b5 (patch)
treeb4cc08e1be5ffe0a60d9090d86f7f0d05b1f6e36 /fs/ceph/super.c
parent6a8ea4706adb4b4d8f77a8da5f9778b65fbf6f48 (diff)
libceph: create messenger with client
This simplifies the init/shutdown paths, and makes client->msgr available during the rest of the setup process. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 387addbf942e..f90dc0b011a7 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -430,20 +430,23 @@ struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
430 struct ceph_options *opt) 430 struct ceph_options *opt)
431{ 431{
432 struct ceph_fs_client *fsc; 432 struct ceph_fs_client *fsc;
433 const unsigned supported_features =
434 CEPH_FEATURE_FLOCK |
435 CEPH_FEATURE_DIRLAYOUTHASH;
436 const unsigned required_features = 0;
433 int err = -ENOMEM; 437 int err = -ENOMEM;
434 438
435 fsc = kzalloc(sizeof(*fsc), GFP_KERNEL); 439 fsc = kzalloc(sizeof(*fsc), GFP_KERNEL);
436 if (!fsc) 440 if (!fsc)
437 return ERR_PTR(-ENOMEM); 441 return ERR_PTR(-ENOMEM);
438 442
439 fsc->client = ceph_create_client(opt, fsc); 443 fsc->client = ceph_create_client(opt, fsc, supported_features,
444 required_features);
440 if (IS_ERR(fsc->client)) { 445 if (IS_ERR(fsc->client)) {
441 err = PTR_ERR(fsc->client); 446 err = PTR_ERR(fsc->client);
442 goto fail; 447 goto fail;
443 } 448 }
444 fsc->client->extra_mon_dispatch = extra_mon_dispatch; 449 fsc->client->extra_mon_dispatch = extra_mon_dispatch;
445 fsc->client->supported_features |= CEPH_FEATURE_FLOCK |
446 CEPH_FEATURE_DIRLAYOUTHASH;
447 fsc->client->monc.want_mdsmap = 1; 450 fsc->client->monc.want_mdsmap = 1;
448 451
449 fsc->mount_options = fsopt; 452 fsc->mount_options = fsopt;