Re: getdents - ext4 vs btrfs performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




We could do this if we have two b-trees, one indexed by filename and
one indexed by inode number, which is what JFS (and I believe btrfs)
does.

Typically the inode number of the destination inode isn't used to index
entries for a readdir tree because of (wait for it) hard links.  You end
up right back where you started with multiple entries per key.

A painful solution is to have the key in the readdir tree allocated by
the tree itself -- count key populations in subtrees per child pointer
and use that to find free keys.  You still have the problem of
correlating entry keys and the location of inodes, but at least now you
have a structure to navigate to try and do that.  You can also trivially
re-use freed keys and have densely packed readdir keys that won't break
32bit f_pos so quickly.

btrfs just punts and has an incrementing 64bit counter per directory
that determines a new entry's position in readdir.  Accompanied by the
obligatory "will be smarter some day" comment :).

- z
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux