ffs_alloc panic patch

Antony Mawer fbsd-stable at mawer.org
Fri Aug 27 12:04:42 PDT 2004


Pavel Merdine wrote:
> Panic is VERY undesirable situation. And I'm in doubt why those people
> who wrote ffs like panics so devotedly:
> 
> # grep -c "panic" ffs_alloc.c ffs_softdep.c
> ffs_alloc.c:37
> ffs_softdep.c:108
> 
> I  think such things are not acceptable in production environment. Why
> those  functions  cannot  just return a failure state and leave system
> working?

Taking a stab in the dark here, I'd suspect that this is a safety 
mechanism -- if something goes awry in the filesystem code, the 
implications could have something of a domino effect and wind up leaving 
you with a hosed filesystem.

Rather than take that chance, the system panics, which attempts to 
minimising the impact the code could have on your filesystem(s) by 
otherwise continuing on.

Someone correct me if I'm off-base here...

Antony


More information about the freebsd-stable mailing list