From owner-freebsd-current@FreeBSD.ORG Sun Sep 25 00:09:36 2005 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BED2416A41F; Sun, 25 Sep 2005 00:09:36 +0000 (GMT) (envelope-from Tor.Egge@cvsup.no.freebsd.org) Received: from pil.idi.ntnu.no (pil.idi.ntnu.no [129.241.107.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D14B43D48; Sun, 25 Sep 2005 00:09:35 +0000 (GMT) (envelope-from Tor.Egge@cvsup.no.freebsd.org) Received: from cvsup.no.freebsd.org (c2h5oh.idi.ntnu.no [129.241.103.69]) by pil.idi.ntnu.no (8.13.1/8.13.1) with ESMTP id j8P09XpI008160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 25 Sep 2005 02:09:34 +0200 (MEST) Received: from localhost (localhost [127.0.0.1]) by cvsup.no.freebsd.org (8.13.1/8.13.1) with ESMTP id j8P09WMc083371; Sun, 25 Sep 2005 00:09:33 GMT (envelope-from Tor.Egge@cvsup.no.freebsd.org) Date: Sun, 25 Sep 2005 00:09:32 +0000 (UTC) Message-Id: <20050925.000932.74671878.Tor.Egge@cvsup.no.freebsd.org> To: truckman@FreeBSD.org From: Tor Egge In-Reply-To: <200509242122.j8OLJp5P091812@gw.catspoiler.org> References: <20050924.190810.74675111.Tor.Egge@cvsup.no.freebsd.org> <200509242122.j8OLJp5P091812@gw.catspoiler.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Sep_25_00:09:32_2005_920)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned-By: mimedefang.idi.ntnu.no, using CLAMD X-SMTP-From: Sender=, Relay/Client=c2h5oh.idi.ntnu.no [129.241.103.69], EHLO=cvsup.no.freebsd.org X-Scanned-By: MIMEDefang 2.48 on 129.241.107.38 X-Scanned-By: mimedefang.idi.ntnu.no, using MIMEDefang 2.48 with local filter 16.42-idi X-Filter-Time: 0 seconds Cc: scottl@FreeBSD.org, current@FreeBSD.org, mckusick@FreeBSD.org Subject: Re: soft updates / background fsck directory link count bug X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 00:09:36 -0000 ----Next_Part(Sun_Sep_25_00:09:32_2005_920)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Relying on ufs_inactive() is probably the wrong thing to do because the > ufs_inactive() call can be deferred indefinitely if another process > holds a reference to the vnode. This is sufficient to cause background > fsck to do the wrong thing even in the normal case. > I think the cleanest fix would be for handle_workitem_remove() to > explicity call ffs_update(). Agreed. The enclosed patch does that. > Another subtle point is that ufs_inactive() calls > vn_write_suspend_wait() before calling UFS_UPDATE(), but I don't think > we want to call vn_write_suspend_wait() here. It isn't needed when running down softupdates dependencies. - Tor Egge ----Next_Part(Sun_Sep_25_00:09:32_2005_920)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="softdep.diff6" Index: sys/ufs/ffs/ffs_softdep.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_softdep.c,v retrieving revision 1.184 diff -u -r1.184 ffs_softdep.c --- sys/ufs/ffs/ffs_softdep.c 5 Sep 2005 22:14:33 -0000 1.184 +++ sys/ufs/ffs/ffs_softdep.c 24 Sep 2005 22:09:50 -0000 @@ -3477,6 +3477,8 @@ } WORKLIST_INSERT(&inodedep->id_inowait, &dirrem->dm_list); FREE_LOCK(&lk); + ip->i_flag |= IN_CHANGE; + ffs_update(vp, 0); vput(vp); } ----Next_Part(Sun_Sep_25_00:09:32_2005_920)----