diff mbox series

libceph: assume argonaut on the server side

Message ID 20181108143140.12906-1-idryomov@gmail.com (mailing list archive)
State New, archived
Headers show
Series libceph: assume argonaut on the server side | expand

Commit Message

Ilya Dryomov Nov. 8, 2018, 2:31 p.m. UTC
No one is running pre-argonaut.  In addition one of the argonaut
features (NOSRCADDR) has been required since day one (and a half,
v2.6.34 vs v2.6.35) of the kernel client.

Allow for the possibility of reusing these feature bits later.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
 fs/ceph/mds_client.c               | 12 +++---------
 include/linux/ceph/ceph_features.h |  8 +-------
 2 files changed, 4 insertions(+), 16 deletions(-)

Comments

Sage Weil Nov. 8, 2018, 4:23 p.m. UTC | #1
On Thu, 8 Nov 2018, Ilya Dryomov wrote:
> No one is running pre-argonaut.  In addition one of the argonaut
> features (NOSRCADDR) has been required since day one (and a half,
> v2.6.34 vs v2.6.35) of the kernel client.
> 
> Allow for the possibility of reusing these feature bits later.
> 
> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
> ---
>  fs/ceph/mds_client.c               | 12 +++---------
>  include/linux/ceph/ceph_features.h |  8 +-------
>  2 files changed, 4 insertions(+), 16 deletions(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index bfba3a040f90..8b3a6f0154f3 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,
>  	info->symlink = *p;
>  	*p += info->symlink_len;
>  
> -	if (features & CEPH_FEATURE_DIRLAYOUTHASH)
> -		ceph_decode_copy_safe(p, end, &info->dir_layout,
> -				      sizeof(info->dir_layout), bad);
> -	else
> -		memset(&info->dir_layout, 0, sizeof(info->dir_layout));
> -
> +	ceph_decode_copy_safe(p, end, &info->dir_layout,
> +			      sizeof(info->dir_layout), bad);
>  	ceph_decode_32_safe(p, end, info->xattr_len, bad);
>  	ceph_decode_need(p, end, info->xattr_len, bad);
>  	info->xattr_data = *p;
> @@ -3180,10 +3176,8 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc,
>  	recon_state.pagelist = pagelist;
>  	if (session->s_con.peer_features & CEPH_FEATURE_MDSENC)
>  		recon_state.msg_version = 3;
> -	else if (session->s_con.peer_features & CEPH_FEATURE_FLOCK)
> -		recon_state.msg_version = 2;
>  	else
> -		recon_state.msg_version = 1;
> +		recon_state.msg_version = 2;
>  	err = iterate_session_caps(session, encode_caps_cb, &recon_state);
>  	if (err < 0)
>  		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
>  	 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING |	\
>  	 CEPH_FEATURE_CEPHX_V2)
>  
> -#define CEPH_FEATURES_REQUIRED_DEFAULT   \
> -	(CEPH_FEATURE_NOSRCADDR |	 \
> -	 CEPH_FEATURE_SUBSCRIBE2 |	 \
> -	 CEPH_FEATURE_RECONNECT_SEQ |	 \
> -	 CEPH_FEATURE_PGID64 |		 \
> -	 CEPH_FEATURE_PGPOOL3 |		 \
> -	 CEPH_FEATURE_OSDENC)
> +#define CEPH_FEATURES_REQUIRED_DEFAULT	0
>  
>  #endif
> -- 
> 2.14.4

Reviewed-by: Sage Weil <sage@redhat.com>
diff mbox series

Patch

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index bfba3a040f90..8b3a6f0154f3 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,
 	info->symlink = *p;
 	*p += info->symlink_len;
 
-	if (features & CEPH_FEATURE_DIRLAYOUTHASH)
-		ceph_decode_copy_safe(p, end, &info->dir_layout,
-				      sizeof(info->dir_layout), bad);
-	else
-		memset(&info->dir_layout, 0, sizeof(info->dir_layout));
-
+	ceph_decode_copy_safe(p, end, &info->dir_layout,
+			      sizeof(info->dir_layout), bad);
 	ceph_decode_32_safe(p, end, info->xattr_len, bad);
 	ceph_decode_need(p, end, info->xattr_len, bad);
 	info->xattr_data = *p;
@@ -3180,10 +3176,8 @@  static void send_mds_reconnect(struct ceph_mds_client *mdsc,
 	recon_state.pagelist = pagelist;
 	if (session->s_con.peer_features & CEPH_FEATURE_MDSENC)
 		recon_state.msg_version = 3;
-	else if (session->s_con.peer_features & CEPH_FEATURE_FLOCK)
-		recon_state.msg_version = 2;
 	else
-		recon_state.msg_version = 1;
+		recon_state.msg_version = 2;
 	err = iterate_session_caps(session, encode_caps_cb, &recon_state);
 	if (err < 0)
 		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
 	 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING |	\
 	 CEPH_FEATURE_CEPHX_V2)
 
-#define CEPH_FEATURES_REQUIRED_DEFAULT   \
-	(CEPH_FEATURE_NOSRCADDR |	 \
-	 CEPH_FEATURE_SUBSCRIBE2 |	 \
-	 CEPH_FEATURE_RECONNECT_SEQ |	 \
-	 CEPH_FEATURE_PGID64 |		 \
-	 CEPH_FEATURE_PGPOOL3 |		 \
-	 CEPH_FEATURE_OSDENC)
+#define CEPH_FEATURES_REQUIRED_DEFAULT	0
 
 #endif