fsck_ufs locked in snaplk

Kris Kennaway kris at obsecurity.org
Tue Apr 25 16:23:50 UTC 2006


On Tue, Apr 25, 2006 at 06:39:09PM +0300, Kostik Belousov wrote:

> Obviously, revisions 1.78, 1.79 of the sys/ufs/ufs/ufs_quota.c
> shall be MFCed. Try this patch (note, I does not tested it):

WTF, I could have sworn I merged that!  Yes, this patch is needed. 
However, I don't think it's the cause of runtime deadlocks.

Kris

> Index: sys/ufs/ufs/ufs_quota.c
> ===================================================================
> RCS file: /usr/local/arch/ncvs/src/sys/ufs/ufs/ufs_quota.c,v
> retrieving revision 1.77
> retrieving revision 1.79
> diff -u -r1.77 -r1.79
> --- sys/ufs/ufs/ufs_quota.c	9 Jan 2006 20:42:19 -0000	1.77
> +++ sys/ufs/ufs/ufs_quota.c	12 Feb 2006 13:20:06 -0000	1.79
> @@ -429,8 +429,9 @@
>  		quotaoff(td, mp, type);
>  	ump->um_qflags[type] |= QTF_OPENING;
>  	mp->mnt_flag |= MNT_QUOTA;
> -	ASSERT_VOP_LOCKED(vp, "quotaon");
> +	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
>  	vp->v_vflag |= VV_SYSTEM;
> +	VOP_UNLOCK(vp, 0, td);
>  	*vpp = vp;
>  	/*
>  	 * Save the credential of the process that turned on quotas.
> @@ -535,8 +536,9 @@
>  	}
>  	MNT_IUNLOCK(mp);
>  	dqflush(qvp);
> -	ASSERT_VOP_LOCKED(qvp, "quotaoff");
> +	vn_lock(qvp, LK_EXCLUSIVE | LK_RETRY, td);
>  	qvp->v_vflag &= ~VV_SYSTEM;
> +	VOP_UNLOCK(qvp, 0, td);
>  	error = vn_close(qvp, FREAD|FWRITE, td->td_ucred, td);
>  	ump->um_quotas[type] = NULLVP;
>  	crfree(ump->um_cred[type]);
> 
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060425/98017865/attachment.pgp


More information about the freebsd-stable mailing list