On Sun, Nov 18, 2001 at 09:59:40AM +0100, Andi Kleen wrote:
>
> You're really asking a FAQ. Please check the FAQ.
>
I did scan through it several times; I guess I wasn't looking for
the right question. My apologies for that, I will read through it
again as soon as oss.sgi.com comes back up.
>
> In short what you're seeing is that the files have their metadata
> (file size) but not their data flushed yet. The file has turned
> into an hole. One of the reasons XFS is so fast is that it delays
> data flushing until it has enough data to allocate a big chunk on
> disk. Because of that it can happen that the data has not made it
> to disk yet, but the file size has, turning the file into a hole
> (= zeroes). The journaling file system does only protect the
> metadata, not the data.
>
Ok, that makes sense. I'm not overly familiar with file system
concepts, but of what use is metadata if the corresponding data
never makes it to the disk?
>
> Possibilities are to type sync manually, change your editor to use
> fsync/O_SYNC/O_DSYNC to force data to disk or mount the filesystem
> with one of the slower-but-somewhat safer sync/dsync etc. options.
>
Changing all applications really isn't an option, but I will take a
look at the mount options.
>
> The other file systems have the same problem BTW, although it is
> less often seen in practice because they don't delay writes as
> aggressively as XFS.
>
>From your explanation I can imagine that it happens on other file
systems as well. I've been relying on journaling file systems for
quite a while now, however, and have never experienced anything
alike with anything other than xfs.
Well, either way, I appreciate your quick response despite my
failing to 'read the fscking documentation' carefully enough.
--
christian zander
phoenix@xxxxxxxxx
|