Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2002 17:33:38 +0200
From:      Matthias Andree <matthias.andree@gmx.de>
To:        freebsd-stable@freebsd.org
Subject:   Re: root (/) not soft-updates by default ?
Message-ID:  <m3ofbylv71.fsf@merlin.emma.line.org>
In-Reply-To: <20020819105452.A14530@blackhelicopters.org> (Michael Lucas's message of "Mon, 19 Aug 2002 10:54:52 -0400")
References:  <20020819144928.GA6628@nebula.wanadoo.fr> <20020819105452.A14530@blackhelicopters.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael Lucas <mwlucas@blackhelicopters.org> writes:

> Soft updates does not work well with IDE controllers with write
> caching enabled; you can cause data loss.
>
> Most IDE controllers ship with write caching enabled.

That's plain wrong, IDE controllers don't bother. If at all, their BIOS
would, but why should someone bloat the scarce BIOS space with write
cache treatment? It's the ATA drives that ship with the write cache
enabled, but that is of no matter to FreeBSD.

FreeBSD-4 in its default configuration ENABLES the write cache
nonetheless (even if you used e. g. the IBM feature tool to turn it
off), unless you put

hw.ata.wc=3D"0"

into /boot/loader.conf.local or /boot/loader.conf and reboot.
(It might be useful to teach atacontrol about the write cache, but then,
you don't turn that write cache knob very often.)

FreeBSD will still enable the write cache for drives that do tagged
queueing if you put hw.ata.tags=3D"1", but with tags, that's a different
issue because you can force cache flush so to support fsync(2), for
example.

> We won't, by default, ship systems which have an unacceptable risk of
> data loss.  :-)

Daring words in the face of current FreeBSD 4 behaviour (that's
described above), which runs in "data loss encouraged" mode by
default. I have been told S=F8ren Schmidt wanted to change the hw.ata.wc
cache setting to default to 0 but was told not to for performance
reasons and POLA and things.

However, the risk is with the write cache of the drive, not with the
softupdates async scheme. The problem is that the write cache can cause
reordering writes which must not be reordered. Without write cache, such
things don't happen. The write cache can corrupt your file system
regardless of whether softupdates are enabled or not.

--=20
Matthias Andree

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m3ofbylv71.fsf>