libceph, ceph: always advertise all supported features
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>
This commit is contained in:
@@ -731,7 +731,7 @@ static struct rbd_client *rbd_client_create(struct ceph_options *ceph_opts)
|
|||||||
kref_init(&rbdc->kref);
|
kref_init(&rbdc->kref);
|
||||||
INIT_LIST_HEAD(&rbdc->node);
|
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))
|
if (IS_ERR(rbdc->client))
|
||||||
goto out_rbdc;
|
goto out_rbdc;
|
||||||
ceph_opts = NULL; /* Now rbdc->client is responsible for ceph_opts */
|
ceph_opts = NULL; /* Now rbdc->client is responsible for ceph_opts */
|
||||||
|
@@ -544,10 +544,6 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
|
|||||||
struct ceph_options *opt)
|
struct ceph_options *opt)
|
||||||
{
|
{
|
||||||
struct ceph_fs_client *fsc;
|
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;
|
int page_count;
|
||||||
size_t size;
|
size_t size;
|
||||||
int err = -ENOMEM;
|
int err = -ENOMEM;
|
||||||
@@ -556,8 +552,7 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
|
|||||||
if (!fsc)
|
if (!fsc)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
fsc->client = ceph_create_client(opt, fsc, supported_features,
|
fsc->client = ceph_create_client(opt, fsc);
|
||||||
required_features);
|
|
||||||
if (IS_ERR(fsc->client)) {
|
if (IS_ERR(fsc->client)) {
|
||||||
err = PTR_ERR(fsc->client);
|
err = PTR_ERR(fsc->client);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@@ -105,8 +105,10 @@ static inline u64 ceph_sanitize_features(u64 features)
|
|||||||
*/
|
*/
|
||||||
#define CEPH_FEATURES_SUPPORTED_DEFAULT \
|
#define CEPH_FEATURES_SUPPORTED_DEFAULT \
|
||||||
(CEPH_FEATURE_NOSRCADDR | \
|
(CEPH_FEATURE_NOSRCADDR | \
|
||||||
|
CEPH_FEATURE_FLOCK | \
|
||||||
CEPH_FEATURE_SUBSCRIBE2 | \
|
CEPH_FEATURE_SUBSCRIBE2 | \
|
||||||
CEPH_FEATURE_RECONNECT_SEQ | \
|
CEPH_FEATURE_RECONNECT_SEQ | \
|
||||||
|
CEPH_FEATURE_DIRLAYOUTHASH | \
|
||||||
CEPH_FEATURE_PGID64 | \
|
CEPH_FEATURE_PGID64 | \
|
||||||
CEPH_FEATURE_PGPOOL3 | \
|
CEPH_FEATURE_PGPOOL3 | \
|
||||||
CEPH_FEATURE_OSDENC | \
|
CEPH_FEATURE_OSDENC | \
|
||||||
@@ -114,11 +116,13 @@ static inline u64 ceph_sanitize_features(u64 features)
|
|||||||
CEPH_FEATURE_MSG_AUTH | \
|
CEPH_FEATURE_MSG_AUTH | \
|
||||||
CEPH_FEATURE_CRUSH_TUNABLES2 | \
|
CEPH_FEATURE_CRUSH_TUNABLES2 | \
|
||||||
CEPH_FEATURE_REPLY_CREATE_INODE | \
|
CEPH_FEATURE_REPLY_CREATE_INODE | \
|
||||||
|
CEPH_FEATURE_MDSENC | \
|
||||||
CEPH_FEATURE_OSDHASHPSPOOL | \
|
CEPH_FEATURE_OSDHASHPSPOOL | \
|
||||||
CEPH_FEATURE_OSD_CACHEPOOL | \
|
CEPH_FEATURE_OSD_CACHEPOOL | \
|
||||||
CEPH_FEATURE_CRUSH_V2 | \
|
CEPH_FEATURE_CRUSH_V2 | \
|
||||||
CEPH_FEATURE_EXPORT_PEER | \
|
CEPH_FEATURE_EXPORT_PEER | \
|
||||||
CEPH_FEATURE_OSDMAP_ENC | \
|
CEPH_FEATURE_OSDMAP_ENC | \
|
||||||
|
CEPH_FEATURE_MDS_INLINE_DATA | \
|
||||||
CEPH_FEATURE_CRUSH_TUNABLES3 | \
|
CEPH_FEATURE_CRUSH_TUNABLES3 | \
|
||||||
CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \
|
CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \
|
||||||
CEPH_FEATURE_MSGR_KEEPALIVE2 | \
|
CEPH_FEATURE_MSGR_KEEPALIVE2 | \
|
||||||
|
@@ -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 void ceph_destroy_options(struct ceph_options *opt);
|
||||||
extern int ceph_compare_options(struct ceph_options *new_opt,
|
extern int ceph_compare_options(struct ceph_options *new_opt,
|
||||||
struct ceph_client *client);
|
struct ceph_client *client);
|
||||||
extern struct ceph_client *ceph_create_client(struct ceph_options *opt,
|
struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private);
|
||||||
void *private,
|
|
||||||
u64 supported_features,
|
|
||||||
u64 required_features);
|
|
||||||
struct ceph_entity_addr *ceph_client_addr(struct ceph_client *client);
|
struct ceph_entity_addr *ceph_client_addr(struct ceph_client *client);
|
||||||
u64 ceph_client_gid(struct ceph_client *client);
|
u64 ceph_client_gid(struct ceph_client *client);
|
||||||
extern void ceph_destroy_client(struct ceph_client *client);
|
extern void ceph_destroy_client(struct ceph_client *client);
|
||||||
|
@@ -596,9 +596,7 @@ EXPORT_SYMBOL(ceph_client_gid);
|
|||||||
/*
|
/*
|
||||||
* create a fresh client instance
|
* create a fresh client instance
|
||||||
*/
|
*/
|
||||||
struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private,
|
struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private)
|
||||||
u64 supported_features,
|
|
||||||
u64 required_features)
|
|
||||||
{
|
{
|
||||||
struct ceph_client *client;
|
struct ceph_client *client;
|
||||||
struct ceph_entity_addr *myaddr = NULL;
|
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);
|
init_waitqueue_head(&client->auth_wq);
|
||||||
client->auth_err = 0;
|
client->auth_err = 0;
|
||||||
|
|
||||||
if (!ceph_test_opt(client, NOMSGAUTH))
|
|
||||||
required_features |= CEPH_FEATURE_MSG_AUTH;
|
|
||||||
|
|
||||||
client->extra_mon_dispatch = NULL;
|
client->extra_mon_dispatch = NULL;
|
||||||
client->supported_features = CEPH_FEATURES_SUPPORTED_DEFAULT |
|
client->supported_features = CEPH_FEATURES_SUPPORTED_DEFAULT;
|
||||||
supported_features;
|
client->required_features = CEPH_FEATURES_REQUIRED_DEFAULT;
|
||||||
client->required_features = CEPH_FEATURES_REQUIRED_DEFAULT |
|
|
||||||
required_features;
|
if (!ceph_test_opt(client, NOMSGAUTH))
|
||||||
|
client->required_features |= CEPH_FEATURE_MSG_AUTH;
|
||||||
|
|
||||||
/* msgr */
|
/* msgr */
|
||||||
if (ceph_test_opt(client, MYIP))
|
if (ceph_test_opt(client, MYIP))
|
||||||
|
Reference in New Issue
Block a user