Re: [PATCH 4/6] ceph: allocate cap_release message when receiving cap import

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

 



Reviewed-by: Sage Weil <sage@xxxxxxxxxxx>

This is one of those annoying situations where we may not have 
preallocated the memory and in the message handler may not be able to.  
It should be easy to find when we come back to clean that up, though, 
since almost all ceph_add_cap_releases() are similarly affected.


On Fri, 4 Jan 2013, Yan, Zheng wrote:
> From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx>
> 
> When client wants to release an imported cap, it's possible there
> is no reserved cap_release message in corresponding mds session.
> so __queue_cap_release causes kernel panic.
> 
> Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx>
> ---
>  fs/ceph/caps.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
> index c90b245..7e90299 100644
> --- a/fs/ceph/caps.c
> +++ b/fs/ceph/caps.c
> @@ -2832,6 +2832,9 @@ void ceph_handle_caps(struct ceph_mds_session *session,
>  	dout(" mds%d seq %lld cap seq %u\n", session->s_mds, session->s_seq,
>  	     (unsigned)seq);
>  
> +	if (op == CEPH_CAP_OP_IMPORT)
> +		ceph_add_cap_releases(mdsc, session);
> +
>  	/* lookup ino */
>  	inode = ceph_find_inode(sb, vino);
>  	ci = ceph_inode(inode);
> -- 
> 1.7.11.7
> 
> --
> 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
> 
> 
--
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