Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Sep 2005 03:50:36 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        phk@haven.freebsd.dk
Cc:        current@FreeBSD.org
Subject:   Re: patch for ext2fs unmount problem at shutdown 
Message-ID:  <200509061050.j86AoauO032564@gw.catspoiler.org>
In-Reply-To: <64186.1125996351@phk.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On  6 Sep, Poul-Henning Kamp wrote:
> In message <200509060841.j868fj1I032057@gw.catspoiler.org>, Don Lewis writes:
> 
>>I suspect both that is one possible reason, and another reason would be
>>to avoid marking the file system clean if any writes timed out.
> 
> In that case the unmount should fail, otherwise the filesystem is
> buggy.

ext2fs is definitely buggy because it writes the superblock to mark the
file system clean before it writes some of the file system meta-data
(without error checking), but this is a different bug that won't get
caught by the nbusy check.  Both ext2fs and ufs rely on vflush(), which
essentially does a vgonel() on all the vnodes, which I don't think will
catch any stuck writes.  Ufs does quite a bit more error checking than
ext2fs, but I don't know if it is enough to avoid marking the file
system clean when it shouldn't be.

> Considering that our kernel presently tend to explode violently on
> disk errors I would say that the nbusy check should just be commented
> out for now and vfs_unmountall() always tried.

vfs_umountall() really needs to be made smart enough to properly unwind
all the dependencies between mounted file systems, swap devices, file
systems mounted on swap-backed or vnode-backed md's, and vnode-backed
swap devices as was discussed at length a while ago.  Perhaps the error
checking on unmount should be combined with the vfs_unmountall()
redesign.



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