From owner-freebsd-fs@FreeBSD.ORG Mon Jan 24 16:52:20 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C84AE1065670 for ; Mon, 24 Jan 2011 16:52:20 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 975F58FC13 for ; Mon, 24 Jan 2011 16:52:20 +0000 (UTC) Received: by iyb26 with SMTP id 26so4304377iyb.13 for ; Mon, 24 Jan 2011 08:52:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.15.194 with SMTP id l2mr5080740iba.34.1295887939509; Mon, 24 Jan 2011 08:52:19 -0800 (PST) Received: by 10.231.59.142 with HTTP; Mon, 24 Jan 2011 08:52:19 -0800 (PST) In-Reply-To: References: <1ABA88EDF84B6472579216FE@Octa64> <20110122111045.GA59117@icarus.home.lan> <20110124144236.GA19500@icarus.home.lan> Date: Mon, 24 Jan 2011 17:52:19 +0100 Message-ID: From: Olivier Smedts To: =?UTF-8?Q?=C5=A0imun_Mikecin?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: Write cache, is write cache, is write cache? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2011 16:52:21 -0000 2011/1/24 Olivier Smedts : > 2011/1/24 =C5=A0imun Mikecin : >> 2011/1/24 Jeremy Chadwick >> >>> The term "flush" means many different things. =C2=A0fsync(2), for examp= le, >>> behaves differently on UFS than it does on ZFS. =C2=A0People 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 "flus= h >>> kernel buffers to disk and hope for the best". >>> >> >> AFAIK, BIO_FLUSH should complete when data was written to disk (not befo= re), >> 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=3D5 if my memory serves me well). = So, >> you shouldn't loose data that was written before BIO_FLUSH executed. > > I thought ZFS also took care of executing BIO_FLUSH after each write > to ZIL, because every bit in ZFS expect writes to be ordered, and some > specific writes to be synced to platters, else your FS is gone if ZIL > is corrupted in some way. The way ZFS works is the reason there's *no* > fsck-like repair tool for it. Of course, this does not work if you > don't use a propre controller or disk, but it should behave that way > for most, no ? > >> =C2=A0 With single disks, all I've seen are read/write errors which can'= t be >> >>> repaired. =C2=A0"zpool status" will actually show what files got affect= ed 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. >> _______________________________________________ >> freebsd-fs@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-fs >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >> > > > > -- > Olivier Smedts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 _ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ASCII ri= bbon campaign ( ) > e-mail: olivier@gid0.org=C2=A0 =C2=A0 =C2=A0 =C2=A0 - against HTML email = & vCards=C2=A0 X > www: http://www.gid0.org=C2=A0 =C2=A0 - against proprietary attachments /= \ > > =C2=A0 "Il y a seulement 10 sortes de gens dans le monde : > =C2=A0 ceux qui comprennent le binaire, > =C2=A0 et ceux qui ne le comprennent pas." > --=20 Olivier Smedts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 _ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ASCII ri= bbon campaign ( ) e-mail: olivier@gid0.org=C2=A0 =C2=A0 =C2=A0 =C2=A0 - against HTML email & = vCards=C2=A0 X www: http://www.gid0.org=C2=A0 =C2=A0 - against proprietary attachments / \ =C2=A0 "Il y a seulement 10 sortes de gens dans le monde : =C2=A0 ceux qui comprennent le binaire, =C2=A0 et ceux qui ne le comprennent pas."