]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
libceph, ceph: always advertise all supported features
authorIlya Dryomov <idryomov@gmail.com>
Fri, 3 Mar 2017 17:16:07 +0000 (18:16 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:18 +0000 (09:19 +0200)
No reason to hide CephFS-specific features in the rbd case.  Recent
feature bits mix RADOS and CephFS-specific stuff together anyway.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c
fs/ceph/super.c
include/linux/ceph/ceph_features.h
include/linux/ceph/libceph.h
net/ceph/ceph_common.c

index 517838b659646d3e02bd0a2ba9e5de2bdf8539f8..16010183b703609e09ccbfb446f728409cea31be 100644 (file)
@@ -731,7 +731,7 @@ static struct rbd_client *rbd_client_create(struct ceph_options *ceph_opts)
        kref_init(&rbdc->kref);
        INIT_LIST_HEAD(&rbdc->node);
 
-       rbdc->client = ceph_create_client(ceph_opts, rbdc, 0, 0);
+       rbdc->client = ceph_create_client(ceph_opts, rbdc);
        if (IS_ERR(rbdc->client))
                goto out_rbdc;
        ceph_opts = NULL; /* Now rbdc->client is responsible for ceph_opts */
index 0ec8d0114e57ba80fdc46b1acdc9b7de7373e276..8b9f645006da3f7fcfeb9308e0bf8b833484c3b1 100644 (file)
@@ -544,10 +544,6 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
                                        struct ceph_options *opt)
 {
        struct ceph_fs_client *fsc;
-       const u64 supported_features =
-               CEPH_FEATURE_FLOCK | CEPH_FEATURE_DIRLAYOUTHASH |
-               CEPH_FEATURE_MDSENC | CEPH_FEATURE_MDS_INLINE_DATA;
-       const u64 required_features = 0;
        int page_count;
        size_t size;
        int err = -ENOMEM;
@@ -556,8 +552,7 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
        if (!fsc)
                return ERR_PTR(-ENOMEM);
 
-       fsc->client = ceph_create_client(opt, fsc, supported_features,
-                                        required_features);
+       fsc->client = ceph_create_client(opt, fsc);
        if (IS_ERR(fsc->client)) {
                err = PTR_ERR(fsc->client);
                goto fail;
index ae2f66833762cd7d63bd77eafb9aed13b6ab2308..fd8b2953c78f85539104fd3741e82a9f37e1e1b5 100644 (file)
@@ -105,8 +105,10 @@ static inline u64 ceph_sanitize_features(u64 features)
  */
 #define CEPH_FEATURES_SUPPORTED_DEFAULT                \
        (CEPH_FEATURE_NOSRCADDR |               \
+        CEPH_FEATURE_FLOCK |                   \
         CEPH_FEATURE_SUBSCRIBE2 |              \
         CEPH_FEATURE_RECONNECT_SEQ |           \
+        CEPH_FEATURE_DIRLAYOUTHASH |           \
         CEPH_FEATURE_PGID64 |                  \
         CEPH_FEATURE_PGPOOL3 |                 \
         CEPH_FEATURE_OSDENC |                  \
@@ -114,11 +116,13 @@ static inline u64 ceph_sanitize_features(u64 features)
         CEPH_FEATURE_MSG_AUTH |                \
         CEPH_FEATURE_CRUSH_TUNABLES2 |         \
         CEPH_FEATURE_REPLY_CREATE_INODE |      \
+        CEPH_FEATURE_MDSENC |                  \
         CEPH_FEATURE_OSDHASHPSPOOL |           \
         CEPH_FEATURE_OSD_CACHEPOOL |           \
         CEPH_FEATURE_CRUSH_V2 |                \
         CEPH_FEATURE_EXPORT_PEER |             \
         CEPH_FEATURE_OSDMAP_ENC |              \
+        CEPH_FEATURE_MDS_INLINE_DATA |         \
         CEPH_FEATURE_CRUSH_TUNABLES3 |         \
         CEPH_FEATURE_OSD_PRIMARY_AFFINITY |    \
         CEPH_FEATURE_MSGR_KEEPALIVE2 |         \
index 88cd5dc8e238a2fa7e8c66a034a8e5b0ae248f21..cecbf5a26e5af4221eb239e394465b3246a1e830 100644 (file)
@@ -262,10 +262,7 @@ int ceph_print_client_options(struct seq_file *m, struct ceph_client *client);
 extern void ceph_destroy_options(struct ceph_options *opt);
 extern int ceph_compare_options(struct ceph_options *new_opt,
                                struct ceph_client *client);
-extern struct ceph_client *ceph_create_client(struct ceph_options *opt,
-                                             void *private,
-                                             u64 supported_features,
-                                             u64 required_features);
+struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private);
 struct ceph_entity_addr *ceph_client_addr(struct ceph_client *client);
 u64 ceph_client_gid(struct ceph_client *client);
 extern void ceph_destroy_client(struct ceph_client *client);
index 108533859a53292cde61a3cedd052a2579684e87..4701d067169f3250880c92accc477ace47c60415 100644 (file)
@@ -596,9 +596,7 @@ EXPORT_SYMBOL(ceph_client_gid);
 /*
  * create a fresh client instance
  */
-struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private,
-                                      u64 supported_features,
-                                      u64 required_features)
+struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private)
 {
        struct ceph_client *client;
        struct ceph_entity_addr *myaddr = NULL;
@@ -615,14 +613,12 @@ struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private,
        init_waitqueue_head(&client->auth_wq);
        client->auth_err = 0;
 
-       if (!ceph_test_opt(client, NOMSGAUTH))
-               required_features |= CEPH_FEATURE_MSG_AUTH;
-
        client->extra_mon_dispatch = NULL;
-       client->supported_features = CEPH_FEATURES_SUPPORTED_DEFAULT |
-               supported_features;
-       client->required_features = CEPH_FEATURES_REQUIRED_DEFAULT |
-               required_features;
+       client->supported_features = CEPH_FEATURES_SUPPORTED_DEFAULT;
+       client->required_features = CEPH_FEATURES_REQUIRED_DEFAULT;
+
+       if (!ceph_test_opt(client, NOMSGAUTH))
+               client->required_features |= CEPH_FEATURE_MSG_AUTH;
 
        /* msgr */
        if (ceph_test_opt(client, MYIP))