Subject: kern/30525: remounting ffs read-only (mount -ur) does not sync metadata
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <pavel.cahyna@st.mff.cuni.cz>
List: netbsd-bugs
Date: 06/14/2005 18:58:00
>Number: 30525
>Category: kern
>Synopsis: remounting ffs read-only (mount -ur) does not sync metadata
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 14 18:58:00 +0000 2005
>Originator: Pavel Cahyna
>Release: NetBSD 2.0_BETA i386
>Organization:
>Environment:
System: NetBSD 2.0_BETA (GENERIC_DIAGNOSTIC s patchem D. Reeda - PR#26839) #4: Wed Oct 6 10:13:10 CEST 2004
pavel@pc:/mnt/obj/kompilace/jadra/compile/GENERIC_DIAGNOSTIC
>Description:
I was testing some patch to ipfilter and expected a kernel panic. To avoid
damage to my filesystem (especially because I was using async mount at that
time) I remounted it read-only before the test. As expected, syslogd started
complaining that it can't write to /var/log/messages, otherwise everything
seemed to be fine. The test resulted in a panic and after rebooting, fsck
said that the root filesystem is clean. Immediately after the kernel
paniced again with: "panic: blkfree: freeing free frag". I ran fsck -f /, it
found and repaired some errors and everything was fine.
So, mount -ur / left the filesystem in an inconsistent state, which
shouldn't happen. And it marked it as clean, so this inconsistency can be
hard to notice.
This has been discussed in December 2004 - see the thread "FFS update
doesn't sync metadata?" starting with an email from Jaromir Dolecek:
Message-ID: <20041205135743.10000492192@s102-n054.tele2.cz>
>How-To-Repeat:
mount a FFS filesystem -o async,rw , then remount it with -o ro,update and run fsck.
Or hard reboot the machine and run fsck after.
Other people report this problem with softdeps instead of async.
See also the message cited above.
>Fix:
unknown.