Re: Dump corrupts ext2?

From: Andreas Dilger (
Date: Wed Oct 10 2001 - 22:13:40 EST

H. Peter Anvin writes:
> By author: Andreas Dilger <>
> > In Linus kernels 2.4.11+ the block devices and filesystems all use the
> > page cache, so no more coherency issues.
> How do you find a random block in the page cache? Last my
> understanding was that the page cache is organized by inode/offset,
> which wouldn't lend itself to looking up a random hardware block.

Doh, you are right of course. I was just thinking "buffer cache" vs.
"page cache", but of course the address space of /dev/hda1 is different
than that of any file inside the mounted filesystem. However, at least
the ext2 metadata is coherent between user space and kernel space (which
is half the battle when doing a backup) and your file data can only be
a few seconds out of date.

> I understand this can be done by sending a "quiet point" command to the
> filesystems, followed by an LVM snapshot, but I doubt may people do that!

Yes, there is now a hook in the VFS to support a snapshot of the filesystem
for backups (or whatever), which LVM uses. It is directly supported by
ext3, reiserfs and XFS. Other filesystems will only have a fsync_dev() and
write_super done, but this should be enough to get things to disk.

It turns out that this is also a handy thing for doing "live" fsck on an
ext2/ext3 filesystem for systems which don't get rebooted very often - you
can still verify that the disk/cables/kernel haven't corrupted anything.

Cheers, Andreas

Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"               -- Dogbert
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:36 EST