Re: [PATCH] ceph: remove incorrect session state check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2022-03-22 at 11:15 +0800, xiubli@xxxxxxxxxx wrote:
> From: Xiubo Li <xiubli@xxxxxxxxxx>
> 
> Once the session is opened the s->s_ttl will be set, and when receiving
> a new mdsmap and the MDS map is changed, it will be possibly will close
> some sessions and open new ones. And then some sessions will be in
> CLOSING state evening without unmounting.
> 
> URL: https://tracker.ceph.com/issues/54979
> Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
> ---
>  fs/ceph/mds_client.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index cd0c780a6f84..4657412bfa53 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -4779,8 +4779,6 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)
>  
>  bool check_session_state(struct ceph_mds_session *s)
>  {
> -	struct ceph_fs_client *fsc = s->s_mdsc->fsc;
> -
>  	switch (s->s_state) {
>  	case CEPH_MDS_SESSION_OPEN:
>  		if (s->s_ttl && time_after(jiffies, s->s_ttl)) {
> @@ -4789,10 +4787,6 @@ bool check_session_state(struct ceph_mds_session *s)
>  		}
>  		break;
>  	case CEPH_MDS_SESSION_CLOSING:
> -		/* Should never reach this when not force unmounting */
> -		WARN_ON_ONCE(s->s_ttl &&
> -			     READ_ONCE(fsc->mount_state) != CEPH_MOUNT_SHUTDOWN);
> -		fallthrough;
>  	case CEPH_MDS_SESSION_NEW:
>  	case CEPH_MDS_SESSION_RESTARTING:
>  	case CEPH_MDS_SESSION_CLOSED:

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux