Daniel,
Nice work!
A couple of comments. If you make the beginning of each index block
look like a an empty directory block (i.e, the first 8 blocks look like
this):
32 bits: ino == 0
16 bits: rec_len == blocksize
16 bits: name_len = 0
... then you will have full backwards compatibility, both for reading
*and* writing. When reading, old kernels will simply ignore the index
blocks, since it looks like it has an unpopulated directory entry. And
if the kernel attempts to write into the directory, it will clear the
BTREE_FL flag, in which case new kernels won't treat the directory as a
tree anymore. (Running a smart e2fsck which knows about directory trees
will be able to restore the tree structure).
Is it worth it? Well, it means you lose an index entry from each
directory block, thus reducing your fanout at each node of the tree by a
worse case of 0.7% in the worst case (1k blocksize) and 0.2% if you're
using 4k blocksizes.
- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Re: [rfc] Near-constant time d... Ingo Oeser
- Re: [rfc] Near-constant time d... Linus Torvalds
- Re: [rfc] Near-constant time d... Daniel Phillips
- Re: [rfc] [LONG] Near-constant... Andreas Dilger
- Re: [rfc] Near-constant time d... Daniel Phillips
- Re: [rfc] Near-constant time d... Davide Libenzi
- Re: [rfc] Near-constant time d... Bill Wendling
- Re: [rfc] Near-constant time d... Rogier Wolff
- Re: [rfc] Near-constant time d... Jamie Lokier
- Re: [rfc] Near-constant time d... Kai Henningsen
- Re: [Ext2-devel] [rfc] Near-constant time directory inde... tytso
- Re: [Ext2-devel] [rfc] Near-constant time directory... Daniel Phillips
- Re: [Ext2-devel] [rfc] Near-constant time direc... tytso
- Re: [Ext2-devel] [rfc] Near-constant time d... Andreas Dilger
- Re: [Ext2-devel] [rfc] Near-constant ti... Daniel Phillips
- Re: [Ext2-devel] [rfc] Near-consta... tytso
- Re: [Ext2-devel] [rfc] Near-co... Andreas Dilger
- Re: [Ext2-devel] [rfc] Near-constant ti... tytso
- Re: [rfc] Near-constant time directory index for Ext2 Kai Henningsen
- Re: [rfc] Near-constant time directory index for Ext2 H. Peter Anvin
- Re: [rfc] Near-constant time directory index for Ext2 Andries . Brouwer

