Subject: Re: soft updates and asynchronous writes
To: None <unishell@hotmail.com>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-help
Date: 11/27/2001 15:49:51
Peter Mancuso <unishell@hotmail.com> wrote:
>about softupdates + asynch
>
>I thought
>
># tunefs -n enable /usr
>and
># mount -o async /usr /dev/ad0s1f
>
>were two different things?
Try thinking of it this way:
There are four possible "modes" for writing to an ffs-type filesystem:
1. Fully synchronous (mount -o sync): everything is written
immediately (before the write call returns), so this is the slowest of
the four.
2. Meta-data synchronous, data asynchronous (mount with no options):
this is the default mode under NetBSD (and FreeBSD for filesystems that
haven't been tunefs -n enable'd), and guarantees a consistent file
system in the event of a system crash (e.g. power failure).
3. Soft updates (mount -o softdep under NetBSD, or tunefs -n enable
under FreeBSD): both data and meta-data writes can be delayed, but are
kept ordered, thus still guaranteeing a consistent file system in the
case of a crash. Soft updates are meant to be as fast as totally
asynchronous mounts, but without the danger of inconsistencies.
4. Fully asynchronous (mount -o async): each block is written whenever
the driver happens to write it, thus giving the possibility of an
inconsistent (and maybe unrecoverable) file system in the event of a
crash. (Note that this is the _default_ mount mode under many versions
of Linux, with fully synchronous often being the only other choice
available!)
Hope this helps. (If I got any of the technical details wrong, I'm
sure one of the file system gurus will correct me :)
jdarrow
--
John Darrow - Senior Technical Specialist Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187 Fax: 630/752-5968
Pager via email: 6303160707@alphapage.airtouch.com Pager: 630/316-0707
Email: John.P.Darrow@wheaton.edu (plain text please, no HTML or proprietary)