Re: [patch 044/164] ocfs2: unlock super lock if lockres refresh failed

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

 



I *think* this is OK.  I'm wary of us clearing state of a broken lock,
but I think other holders on this node won't get any farther.
Essentially, I'm worried that we have some state on this node that other
nodes won't see if we let them get unwedged.  But if we are changing
things, we already have an EX, so they are just as wedged.

Plus, you already merged it.

Acked-by: Joel Becker <jlbec@xxxxxxxxxxxx>

On Thu, Feb 21, 2013 at 04:42:45PM -0800, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> From: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
> Subject: ocfs2: unlock super lock if lockres refresh failed
> 
> If lockres refresh failed, the super lock will never be released which
> will cause some processes on other cluster nodes hung forever.
> 
> Signed-off-by: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
> Cc: Joel Becker <jlbec@xxxxxxxxxxxx>
> Cc: Mark Fasheh <mfasheh@xxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
> 
>  fs/ocfs2/dlmglue.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff -puN fs/ocfs2/dlmglue.c~ocfs2-unlock-super-lock-if-lockres-refresh-failed fs/ocfs2/dlmglue.c
> --- a/fs/ocfs2/dlmglue.c~ocfs2-unlock-super-lock-if-lockres-refresh-failed
> +++ a/fs/ocfs2/dlmglue.c
> @@ -2545,6 +2545,7 @@ int ocfs2_super_lock(struct ocfs2_super 
>  	 * everything is up to the caller :) */
>  	status = ocfs2_should_refresh_lock_res(lockres);
>  	if (status < 0) {
> +		ocfs2_cluster_unlock(osb, lockres, level);
>  		mlog_errno(status);
>  		goto bail;
>  	}
> @@ -2553,8 +2554,10 @@ int ocfs2_super_lock(struct ocfs2_super 
>  
>  		ocfs2_complete_lock_res_refresh(lockres, status);
>  
> -		if (status < 0)
> +		if (status < 0) {
> +			ocfs2_cluster_unlock(osb, lockres, level);
>  			mlog_errno(status);
> +		}
>  		ocfs2_track_lock_refresh(lockres);
>  	}
>  bail:
> _

-- 

 "I'm living so far beyond my income that we may almost be said
 to be living apart."
         - e e cummings

			http://www.jlbec.org/
			jlbec@xxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]