mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 18:07:03 +00:00
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:
parent
a351e9b9fc
commit
74da4a0f57
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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 | \
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user