aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2018-11-08 08:55:21 -0500
committerIlya Dryomov <idryomov@gmail.com>2018-11-08 11:51:11 -0500
commit23c625ce3065e40c933a4239efb9b11f1194a343 (patch)
tree29a265cc5a3495bf156532627ad8e969fa3c866e
parent71f2cc64d027d712f29bf8d09d3e123302d5f245 (diff)
libceph: assume argonaut on the server side
No one is running pre-argonaut. In addition one of the argonaut features (NOSRCADDR) has been required since day one (and a half, 2.6.34 vs 2.6.35) of the kernel client. Allow for the possibility of reusing these feature bits later. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com>
-rw-r--r--fs/ceph/mds_client.c12
-rw-r--r--include/linux/ceph/ceph_features.h8
2 files changed, 4 insertions, 16 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 67a9aeb2f4ec..bd13a3267ae0 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -80,12 +80,8 @@ static int parse_reply_info_in(void **p, void *end,
80 info->symlink = *p; 80 info->symlink = *p;
81 *p += info->symlink_len; 81 *p += info->symlink_len;
82 82
83 if (features & CEPH_FEATURE_DIRLAYOUTHASH) 83 ceph_decode_copy_safe(p, end, &info->dir_layout,
84 ceph_decode_copy_safe(p, end, &info->dir_layout, 84 sizeof(info->dir_layout), bad);
85 sizeof(info->dir_layout), bad);
86 else
87 memset(&info->dir_layout, 0, sizeof(info->dir_layout));
88
89 ceph_decode_32_safe(p, end, info->xattr_len, bad); 85 ceph_decode_32_safe(p, end, info->xattr_len, bad);
90 ceph_decode_need(p, end, info->xattr_len, bad); 86 ceph_decode_need(p, end, info->xattr_len, bad);
91 info->xattr_data = *p; 87 info->xattr_data = *p;
@@ -3182,10 +3178,8 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc,
3182 recon_state.pagelist = pagelist; 3178 recon_state.pagelist = pagelist;
3183 if (session->s_con.peer_features & CEPH_FEATURE_MDSENC) 3179 if (session->s_con.peer_features & CEPH_FEATURE_MDSENC)
3184 recon_state.msg_version = 3; 3180 recon_state.msg_version = 3;
3185 else if (session->s_con.peer_features & CEPH_FEATURE_FLOCK)
3186 recon_state.msg_version = 2;
3187 else 3181 else
3188 recon_state.msg_version = 1; 3182 recon_state.msg_version = 2;
3189 err = iterate_session_caps(session, encode_caps_cb, &recon_state); 3183 err = iterate_session_caps(session, encode_caps_cb, &recon_state);
3190 if (err < 0) 3184 if (err < 0)
3191 goto fail; 3185 goto fail;
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 6b92b3395fa9..65a38c4a02a1 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -213,12 +213,6 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
213 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \ 213 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \
214 CEPH_FEATURE_CEPHX_V2) 214 CEPH_FEATURE_CEPHX_V2)
215 215
216#define CEPH_FEATURES_REQUIRED_DEFAULT \ 216#define CEPH_FEATURES_REQUIRED_DEFAULT 0
217 (CEPH_FEATURE_NOSRCADDR | \
218 CEPH_FEATURE_SUBSCRIBE2 | \
219 CEPH_FEATURE_RECONNECT_SEQ | \
220 CEPH_FEATURE_PGID64 | \
221 CEPH_FEATURE_PGPOOL3 | \
222 CEPH_FEATURE_OSDENC)
223 217
224#endif 218#endif