DragonFly kernel List (threaded) for 2009-03
DragonFly BSD
DragonFly kernel List (threaded) for 2009-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: 0byte files after crash

From: Oliver Fromme <check+kgt66200rsmid0vg@xxxxxxxxxx>
Date: 20 Mar 2009 15:18:51 GMT

Dmitri Nikulin wrote:
 > I agree, but if it is practical to implement behaviour similar to
 > ext3's "data=ordered" for UFS soft updates, then that is certainly a
 > good measure.

That's easy:  Just switch soft-updates off and mount the
file system with the "sync" option.  Of course it will be
much slower then, but that's how UFS works.  It's not a
journaling file system.  For a journaling file system,
the situation is different.

And of course, without soft-updates, you increase the risk
of introducing file-system inconsistencies upon crashes.

I agree with the people that argue that the applications
need to be fixed.  Note that critical applications like
MTAs and most editors are already safe; they call fsync()
before closing a file and when renaming files.  The latter
is especially important when a file is updated by creating
a temporary copy and then moving it over the old file.  If
you don't sync, you might lose _both_ files after a crash.

Best regards

Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]