Re: [Ext2-devel] [rfc] Near-constant time directory index for Ext2

Andreas Dilger (adilger@turbolinux.com)
Fri, 23 Feb 2001 17:32:32 -0700 (MST)


Ted writes:
> Note that in the long run, the fully comatible version should probably
> have a COMPAT feature flag set so that you're forced to use a new enough
> version of e2fsck. Otherwise an old e2fsck may end up not noticing
> corruptions in an index block which might cause a new kernel to have
> serious heartburn.

Actually, having a COMPAT flag also helps in other ways:

1) Turning indexing on and off is not a mount option as it currently is
(or automatically done) so it will quell Linus' fears about priniciple
of least surprise (i.e. not converting a filesystem without user action).
A superblock COMPAT flag is more in keeping with other ext2 features.

2) Running a new e2fsck on a COMPAT_INDEX filesystem could create the
index for existing "large" directories that don't have the BTREE/INDEX
flag set, so the kernel only ever has to deal with incremental indexing
after the first block. The kernel would just do linear access on
existing multi-block directories until e2fsck is run.

3) Clearing the COMPAT flag would make e2fsck remove the indexes, if the
user so desires. I think this would be the behaviour of existing
e2fsck anyways.

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?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/