FW: ResierFS limit on number of directories in a directory?

David Ritchie dritchie at securify.com
Fri Oct 29 17:31:01 CDT 2004

On Fri, 2004-10-29 at 14:26, Rick Crelia wrote:
> James, 
> You're correct, you can only have up to 32K files or sub-dirs
> (or, more accurately, hard links) in a given directory when using
> ext2/ext3 filesystems. JFS also has this limitation. That leaves,
> for all practical purposes, ReiserFS and XFS.

Actually, the restriction is that you can only have 32K links to a
single inode.  Sub-dirs (because of the ".." entry) count, files do not.

This also means that you cannot have more than 32K links to a single
file, even if the links are in different directories.

ReiserFS can lie about the link count (struct stat st_nlink) to the rest
of the kernel because it uses other methods for it's internal

I've created far more than 32000 files in a single directory using ext3,
so I have direct experience that it's possible.  I'd say it's not
advisable however--the search time to open()/unlink()/etc a single file
is very long.  ReiserFS improves this as well.


More information about the Linux-PowerEdge mailing list