Re: [PATCH] ceph: flush cap release on session flush

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

 



On Tue, 2023-02-07 at 13:04 +0800, xiubli@xxxxxxxxxx wrote:
> From: Xiubo Li <xiubli@xxxxxxxxxx>
> 
> MDS expects the completed cap release prior to responding to the
> session flush for cache drop.
> 
> Cc: <stable@xxxxxxxxxx>
> URL: http://tracker.ceph.com/issues/38009
> Cc: Patrick Donnelly <pdonnell@xxxxxxxxxx>
> Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
> ---
>  fs/ceph/mds_client.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 3c9d3f609e7f..51366bd053de 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -4039,6 +4039,12 @@ static void handle_session(struct ceph_mds_session *session,
>  		break;
>  
>  	case CEPH_SESSION_FLUSHMSG:
> +		/* flush cap release */
> +		spin_lock(&session->s_cap_lock);
> +		if (session->s_num_cap_releases)
> +			ceph_flush_cap_releases(mdsc, session);
> +		spin_unlock(&session->s_cap_lock);
> +
>  		send_flushmsg_ack(mdsc, session, seq);
>  		break;
>  

Ouch! Good catch!

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