From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel Hilzinger Subject: Re: Atomic filesystem or not Date: Thu, 15 Jul 2004 15:25:23 +0200 Message-ID: <200407151525.23142.marcel@hilzinger.hu> References: <200407151434.23082.marcel@hilzinger.hu> <200407151354.47063.ctpm@ist.utl.pt> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com In-Reply-To: <200407151354.47063.ctpm@ist.utl.pt> Content-Disposition: inline List-Id: Content-Type: text/plain; charset="utf-8" To: Claudio Martins , reiserfs-list@namesys.com Donnerstag 15 Juli 2004 14.54 d=C3=A1tummal ezt =C3=ADrta: > On Thursday 15 July 2004 13:34, Marcel Hilzinger wrote: > > I tried to do a crash-test with Reiser4. I copied a 650 MB file from > > directory A to directory B and pressed the reset buttom at approx 300 MB > > (the testmachine has 256 MB RAM). > > > > After reboot the 300 MB chunk was still in B. > > I thougt it should be either there full or not at all? Or did I > > understand something wrong? Does it work only with files < RAM? What's > > the difference > > You did understand something wrong ;-) I was quite sure about this :-)) > A copy using the Unix cp command is not an atomic operation per se. When > it is said that reiser4 is atomic what it means is that each low level > operation on the filesystem either happens or not at all. That means that > each block write request issued by cp either happens or not, but the enti= re > 650MB copy itself is composed of many separate atomig requests. > > So what you shouldn't see on the half copied file is blocks which conta= in > zeros or otherwise garbage data that didn't belong to the original file (= as > somethimes happens on other journalling filesystems, reiserfs 3.6 sometim= es > included). If you check the differences between the files, they should > contain the same data up to the last block that hit disk surface before y= ou > pressed the reset button. OK. Everything clear now. I will then make an octal or a hexa dump of the=20 original and the copied file and compare them. If Reiser4 is atomic, there= =20 must not be any different entry in the copied file. Thanks. Marcel =2D-=20 =C3=9Cdv=C3=B6zlettel -- Mit freundlichen Gr=C3=BCssen, Marcel Hilzinger