Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 1999 09:04:52 -0700 (PDT)
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Alexander Maret <maret@atrada.de>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: softupdates: do I understand this correctly?
Message-ID:  <Pine.BSF.4.05.9909220855410.6368-100000@fw.wintelcom.net>
In-Reply-To: <58A002A02C5ED311812E0050044517F00D23B9@erlangen01.axis.de>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 22 Sep 1999, Alexander Maret wrote:

> I've read the abstract about SoftUpdates but as 
> my english is not that good I'm not sure if I 
> understood everything correctly:
> 
> Here is my current view of this topic:
> 
> synchronous mode:
> doing a write operation in this mode causes the
> system to write all dependenies and then write the
> data to disk. The system waits for every command
> to be completed. Therefor this mode is slow but safe.
> 
> asynchronous mode:
> the system starts every command (i.e. write dependencies,
> write data) and doesn't wait for the command beeing 
> completed. Because of data being cashed this mode is not
> very safe.
> 
> softupdates mode:
> the system cashes data and tracks dependencies to write 
> cashed data (including dependencies) afterwards in one go 
> (=delayed write). 
> 
> advantage of softupdates:
> - in case of a crash it is more likely that every data is
> already been written to disk because the system writes data
> in one go and doesn't have to wait i.e. for a program output 
> while there is an open file.
> 
> 
> Can anybody confirm this or do I have a completly wrong
> view of this topic. Please comment my thoughts.

No, it's not block caching that softupdates helps with, it's metadata.
metadata is directory structures, inode maps, and the freelist.

Softupdates ensures that directory operations are performed in the
proper order but asynchronously.

If you were to delete a file with softupdates enabled, softupdates
would make sure that these things happen in order:
  1) directory entry is removed (and flushed to disk)
  2) inode is scrubbed and returned to the cyl grp (and flushed to disk)
  3) blocks allocated to the inode are moved to the freelist
        (and flushed to disk)

(a reverse of this operation would happen for creation of a file)

Now in 'normal mode' (different from 'sync' mode) this order is enforced
because the directory operations are done in order and don't return to
the calling process until complete.

'sync' mode is diffent, sync mode is like 'normal' mode however there
is no write caching _at all_.

'async' mode would queue all three operations (for the file create)
but not enforce an ordering on them, if enough directory ops are
being done async and you crash, the filesystem will become something
out of "this is your mind, this is your mind mounted async with a
power failure' *splat*

hope this helps,
-Alfred








> 
> Alex
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9909220855410.6368-100000>