patch for ext2fs unmount problem at shutdown

Poul-Henning Kamp phk at
Tue Sep 6 01:45:54 PDT 2005

In message <200509060841.j868fj1I032057 at>, 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

>> I think we should do away with the nbusy check, including the 35
>> lines of softupdate magic and call vfs_unmountall() in all circumstances
>> (but retain the check for !cold, RB_NOSYNC and panic).
>> Instead we should add a flag to VFS_UNMOUNT that means "don't hang
>> forever" and use that in vfs_unmountall().
>That makes sense longer term, but for quite some time we've had a number
>of users who have been rather unhappy to find out that every time they
>reboot with a mounted ext2fs file system that *all* of their file
>systems are marked dirty and require attention from fsck.

I am really not keen on adding more magic features to the buffer cache
if we can get the same effect by taking away code.

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.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the freebsd-current mailing list