panic(9) vs. RB_NOSYNC
Konstantin Belousov
kostikbel at gmail.com
Thu Aug 8 21:57:24 UTC 2013
On Thu, Aug 08, 2013 at 02:36:51PM +0900, Masao Uebayashi wrote:
> panic(9) (actually vpanic()) sets RB_NOSYNC when panicstr is already
> set. What is the reasoning of this?
>
> My understanding is that panic() attempts VFS "sync" operation at
> first. If another panic() is triggered during that, give up VFS
> "sync". Is this correct? If so, how reliable is this design? I
> wonder if attempting such a complex task like VFS "sync" after a panic
> is a good idea.
Look at the end of the vpanic(), right before kern_reboot() call.
There, kernel does
if (!sync_on_panic)
bootopt |= RB_NOSYNC;
so it only syncs when sync_on_panic sysctl is set to non-zero, which
is zero by default.
Basically, this option might be reasonable when you debug something
not related to i/o+VM+storage drivers, and you know what you do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130809/33fb6680/attachment.sig>
More information about the freebsd-arch
mailing list