*BSD News Article 62132


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc,comp.os.linux.development.system
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!gatech!newsfeed.internetmci.com!howland.reston.ans.net!ix.netcom.com!netcom.com!jlemon
From: jlemon@netcom.com (Jonathan Lemon)
Subject: Re: The better (more suitable)Unix?? FreeBSD or Linux
Message-ID: <jlemonDMtpAz.3rJ@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <4er9hp$5ng@orb.direct.ca> <4fo1tu$n31@news.jf.intel.com> <DMrCE4.3HF@pe1chl.ampr.org> <4ftjt9$fjs@park.uvsc.edu>
Date: Thu, 15 Feb 1996 15:20:59 GMT
Lines: 46
Sender: jlemon@netcom22.netcom.com
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:14334 comp.os.linux.development.system:17979

In article <4ftjt9$fjs@park.uvsc.edu>,
Terry Lambert  <terry@lambert.org> wrote:
>
>Let us also agree that the UFS use of synchronus updates is as
>a simple method of ensuring write ordering without violating
>patents or rewriting a lot of code.
>
>Let us discuss the desirability of order metadata writes.
>
>
>Posit:	ordered metadata writes insure the determisitic
>	recoverability of changes to file system structure,
>
>Conclusion:	ordered metadata writea are desirable.
>
>] The claim (usually) isn't that async metadata is better in
>] this respect, but it is not worse and it is faster.  Hence
>] i
>
>Since the recoverability of file system structure is unrelated
>to the recovery of data within files as container objects, your
>claim about "not worse" applies only to files as container
>objects, and is not applicable to the discussion of write
>ordering or the use of syncronous I/O as a mechanism used in
>the implementation of write ordering.

It is apparent to me that the filesystem safety is dependent on ordered
metadata updates.  FFS uses sync writes as the _implementation_ for ordered
updates.  'sync' in this sentence, meaning "write this to disk right NOW".

However, if metadata is written in the _same_ order, but async, I would believe
that the recoverability of the filesystem is preserved.  'async' in this 
context, meaning "write this to disk when convenient".  However, this
introduces the problem of data dependencies (eg: a datablock write may have
to be delayed until the metadata is flushed first) and would probably be
difficult to implement, as Terry alluded to above.

In this sense, "sync vs async" is a the wrong argument; it should really be
"ordered vs unordered" instead.

My question is, does ext2fs preserve ordering, even though it writes metadata
async?  If not, then it is arguably more unsafe, even from the user's point 
of view.  (eg: if you have to re-run 'mkfs' on a disk to fix consistency
problems, then you lose more data than just truncating a couple of files, no?)
--
Jonathan