Re: [PATCH] ceph: wake up 'safe' waiters when unregistering request

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

 



Applied this to the testing branch. Thanks!

sage


On Thu, 31 Oct 2013, Yan, Zheng wrote:

> From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx>
> 
> We also need to wake up 'safe' waiters if error occurs or request
> aborted. Otherwise sync(2)/fsync(2) may hang forever.
> 
> Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx>
> ---
>  fs/ceph/mds_client.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 8ef7926..cb6a7ae 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -643,6 +643,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc,
>  		iput(req->r_unsafe_dir);
>  		req->r_unsafe_dir = NULL;
>  	}
> +	
> +	complete_all(&req->r_safe_completion);
>  
>  	ceph_mdsc_put_request(req);
>  }
> @@ -2186,7 +2188,6 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
>  	if (head->safe) {
>  		req->r_got_safe = true;
>  		__unregister_request(mdsc, req);
> -		complete_all(&req->r_safe_completion);
>  
>  		if (req->r_got_unsafe) {
>  			/*
> -- 
> 1.8.1.4
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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