On Sun, 5 Nov 2017, Konstantin Belousov wrote:
On Sun, Nov 05, 2017 at 03:06:22AM +1100, Bruce Evans wrote:
On Sun, 22 Oct 2017, Konstantin Belousov wrote:
Author: kib
Date: Sun Oct 22 08:11:45 2017
New Revision: 324853
URL: https://svnweb.freebsd.org/changeset/base/324853
Log:
Remove the support for mknod(S_IFMT), which created dummy vnodes with
VBAD type.
FFS ffs_write() VOP catches such vnodes and panics, other VOPs do not
check for the type and their behaviour is really undefined. The
comment claims that this support was done for 'badsect' to flag bad
sectors, we do not have such facility in kernel anyway.
badsect(8) is a utility and this commit breaks it by removing its kernel
support.
I see, thank you for the pointer. I will prepare the patch to remove
badsect(8).
That would increase the number of things to fix.
Even if badsect(8) is implemented less hackishly, binary compatibility
for mknod(2) requires ifdefing it with COMPAT_*.
I only checked that badsect(*) worked before this commit without INVARIANTS
or soft updates. Perhaps the panic always occurs with INVARIANTS due to
some INAVRIANTS check being wrong, or soft updates doesn't understand this
case. badsect(8) says to run badsect on a "quiet" file system, but this
should only be necessary to prevent the bad block being reallocated while
you are creating a VBAD file to hold it. Note that mknod(S_IFMT) doesn't
force an fsck before the next mount. This seems to be be just another bug
involving the clean flag -- I doubt that it is really safe to never clean
up the VBAD files, so creating one should have set a sticky dirty flag.
Bruce
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"