Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2011 16:09:10 +0100
From:      =?ISO-8859-2?Q?=A9imun_Mikecin?= <numisemis@gmail.com>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>, freebsd-fs@freebsd.org
Subject:   Re: Write cache, is write cache, is write cache?
Message-ID:  <AANLkTi=K0xYJciWgtzTkMP-BhnOOfc5UeUgX--sCVLma@mail.gmail.com>
In-Reply-To: <20110124144236.GA19500@icarus.home.lan>
References:  <1ABA88EDF84B6472579216FE@Octa64> <20110122111045.GA59117@icarus.home.lan> <AANLkTik_rii-F_QWTP3OdyTS0gx1tDxv6--2LGGF6Ear@mail.gmail.com> <20110124144236.GA19500@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/1/24 Jeremy Chadwick <freebsd@jdc.parodius.com>

> The term "flush" means many different things.  fsync(2), for example,
> behaves differently on UFS than it does on ZFS.  People think that
> "flush" means "guarantee the data written was written to disk", but
> ensuring an actual ATA/SCSI command completes **and** has had its data
> written to the platters is an entirely different beast (IMO) than "flush
> kernel buffers to disk and hope for the best".
>

AFAIK, BIO_FLUSH should complete when data was written to disk (not before),
or in the case of battery backed cache: when data was written to battery
backed cache.
AFAIK, ZFS doesn't only "flush kernel buffers" (like UFS does), but also
executes BIO_FLUSH every X seconds (X=5 if my memory serves me well). So,
you shouldn't loose data that was written before BIO_FLUSH executed.

   With single disks, all I've seen are read/write errors which can't be

> repaired.  "zpool status" will actually show what files got affected as
> a result of the issue, though sometimes "zpool scrub" needs to be run
> before this can be detected.


Adding redudancy does make your data safer, but if everything is working as
explained, sudden power-loss shouldn't be the cause of those errors even
with single disks. Correct me if you think that I'm mistaken.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=K0xYJciWgtzTkMP-BhnOOfc5UeUgX--sCVLma>