From owner-freebsd-stable@FreeBSD.ORG Wed Apr 26 01:11:08 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 523D916A403 for ; Wed, 26 Apr 2006 01:11:08 +0000 (UTC) (envelope-from atanas@asd.aplus.net) Received: from pro20.abac.com (pro20.abac.com [66.226.64.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB6A643D45 for ; Wed, 26 Apr 2006 01:11:07 +0000 (GMT) (envelope-from atanas@asd.aplus.net) Received: from [216.55.129.5] (asd2.aplus.net [216.55.129.5]) (authenticated bits=0) by pro20.abac.com (8.13.6/8.13.6) with ESMTP id k3Q1B6Aq017797; Tue, 25 Apr 2006 18:11:06 -0700 (PDT) (envelope-from atanas@asd.aplus.net) Message-ID: <444EC8EA.8050305@asd.aplus.net> Date: Tue, 25 Apr 2006 18:12:10 -0700 From: Atanas User-Agent: Thunderbird 1.5.0.2 (Macintosh/20060419) MIME-Version: 1.0 To: Kris Kennaway References: <20060425001751.S44618@woozle.rinet.ru> <20060424202859.GA18457@xor.obsecurity.org> <20060425004405.G44618@woozle.rinet.ru> <20060424205026.GA18844@xor.obsecurity.org> <20060425134418.J57625@woozle.rinet.ru> <20060425080932.1rv9hq0rcws4wc84@www.wolves.k12.mo.us> <20060425133532.GD1446@deviant.kiev.zoral.com.ua> <20060425095610.ibv24kg1kw00s040@www.wolves.k12.mo.us> <20060425185741.C71240@woozle.rinet.ru> <20060425153909.GE1446@deviant.kiev.zoral.com.ua> <20060425162252.GA54244@xor.obsecurity.org> In-Reply-To: <20060425162252.GA54244@xor.obsecurity.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 1.47 (SPF_SOFTFAIL) Cc: freebsd-stable@freebsd.org Subject: Re: fsck_ufs locked in snaplk X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 01:11:08 -0000 Kris Kennaway said the following on 4/25/06 9:22 AM: > 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. > Thanks for the heads up! I was just about to release the next production box without checking that and assuming the QUOTA fix was already in place. I would like to confirm that I have another fully loaded server running 6.1-PRERELEASE (BETA2 based on 6-STABLE) from Mar 1 with manually patched sys/ufs/ufs/ufs_quota.c (1.74.2.1 2006/01/14) with a similar diff generated from CURRENT between 1.77 and 1.80. 55 days uptime and no problems so far. Regards, Atanas P.S. Forgot to CC the list, sorry for the double post. >> 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]); >> >> > >