xfs
[Top] [All Lists]

bdflush (was: corrupt inode)

To: Linux XFS Mailing List <linux-xfs@xxxxxxxxxxx>
Subject: bdflush (was: corrupt inode)
From: Federico Sevilla III <jijo@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 9 Aug 2001 22:13:36 +0800 (PHT)
In-reply-to: <3B7296F9.E1FAB9CA@xxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Thu, 9 Aug 2001 at 08:58, yocum@xxxxxxxx wrote:
> Nope. If the machine dies while there's still data in the buffer (in
> local memory cache) that data is gone.

And it's possible to get files filled with binary zeroes, which is
explained in the FAQ. Right?

> You can lose an amount of data that is up to 30% of your available RAM
> or 30 seconds worth depending.

The default settings of /proc/sys/vm/bdflush with Linux kernel 2.4.7 (and
most others, 2.4 and 2.2 kernels, I presume) are:

nfract          = 30
ndirty          = 64
nrefill         = 64
nref_dirt       = 256
age_buffer      = 3000
age_super       = 60

Which means that (looking at the age_buffer and age_super values) that
data block buffers are flushed at least every 30 seconds while metadata
buffers are flushed at least every 1/60th of a second.

So will setting age_buffer to 100 jiffies (1 second) be equivalent to
running "sync" every second via a cron job?

This does not seem to be XFS-specific, but I hope the list members will
pardon my asking here. Yes, I _have_ read
/usr/src/linux/Documentation/filesystems/proc.txt, without which I
wouldn't have been able to understand the contents of
/proc/sys/vm/bdflush.

I am still unclear as to whether the actions of bdflush are equivalent to
those of sync, though, at least with XFS. (I am not sure whether this is
filesystem-specific or not)

Also: let's say I modify a small file, then leave the system active for 30
seconds. Theoretically that means the data would have been flushed to disk
already, right? Assuming write cache is turned off, of course. Then will
turning off the machine (or it dying for some reason) cause a file filled
with binary zeroes? It shouldn't, at least by my limited understanding. I
hope I am correct.

Thanks for your patience.

 --> Jijo

--
Federico Sevilla III  :: jijo@xxxxxxxxxxxxxxxxxxxx
Network Administrator :: The Leather Collection, Inc.
GnuPG Key: <http://www.leathercollection.ph/jijo.gpg>



<Prev in Thread] Current Thread [Next in Thread>