mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]>
This commit is contained in:
parent
6a8ea4706a
commit
6ab00d465a
4 changed files with 34 additions and 28 deletions
|
|
@ -430,20 +430,23 @@ struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
|
|||
struct ceph_options *opt)
|
||||
{
|
||||
struct ceph_fs_client *fsc;
|
||||
const unsigned supported_features =
|
||||
CEPH_FEATURE_FLOCK |
|
||||
CEPH_FEATURE_DIRLAYOUTHASH;
|
||||
const unsigned required_features = 0;
|
||||
int err = -ENOMEM;
|
||||
|
||||
fsc = kzalloc(sizeof(*fsc), GFP_KERNEL);
|
||||
if (!fsc)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
fsc->client = ceph_create_client(opt, fsc);
|
||||
fsc->client = ceph_create_client(opt, fsc, supported_features,
|
||||
required_features);
|
||||
if (IS_ERR(fsc->client)) {
|
||||
err = PTR_ERR(fsc->client);
|
||||
goto fail;
|
||||
}
|
||||
fsc->client->extra_mon_dispatch = extra_mon_dispatch;
|
||||
fsc->client->supported_features |= CEPH_FEATURE_FLOCK |
|
||||
CEPH_FEATURE_DIRLAYOUTHASH;
|
||||
fsc->client->monc.want_mdsmap = 1;
|
||||
|
||||
fsc->mount_options = fsopt;
|
||||
|
|
|
|||
Loading…
Reference in a new issue