[Gllug] Linux equivalent of OS X filesystem Directory

Nix nix at esperi.org.uk
Sat Nov 22 15:28:13 UTC 2008


On 20 Nov 2008, C. Cooke outgrape:
> Depends entirely on the filesystem. ext3, for instance, can do this. It 
> also uses a parallel [1] tree-based directory index [2], which is much
> faster. Several other filesystems are entirely tree-based. 
>
> [1]
> Parallel in that ext3 will prefer the tree but fall back to the old
> linked list method, which is always kept up to date. Thus, directories
> in ext3 are actually *more* resilient than many other systems.
>
> [2]
> Turn on the 'dir_index' option on the filesystem and run e2fsck -D if 
> this feature is disabled - it should be enabled by default on new
> filesystems, though. 

The dir_index feature isn't really tree-based (you have to wait for ext4
for that). It maintains a parallel hash table for each sufficiently-
large directory, not a tree, and looks up files by hash lookups,
eliminating linear searches.

-- 
`Not even vi uses vi key bindings for its command line.' --- PdS
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list