Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Sep 2005 00:09:32 +0000 (UTC)
From:      Tor Egge <Tor.Egge@cvsup.no.freebsd.org>
To:        truckman@FreeBSD.org
Cc:        scottl@FreeBSD.org, current@FreeBSD.org, mckusick@FreeBSD.org
Subject:   Re: soft updates / background fsck directory link count bug
Message-ID:  <20050925.000932.74671878.Tor.Egge@cvsup.no.freebsd.org>
In-Reply-To: <200509242122.j8OLJp5P091812@gw.catspoiler.org>
References:  <20050924.190810.74675111.Tor.Egge@cvsup.no.freebsd.org> <200509242122.j8OLJp5P091812@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
----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)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050925.000932.74671878.Tor.Egge>