]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: Remove 65000 subdirectory limit
authorAndreas Dilger <adilger@clusterfs.com>
Wed, 18 Jul 2007 12:38:01 +0000 (08:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 18 Jul 2007 12:38:01 +0000 (08:38 -0400)
commit2609f2ae1ac4c5006c05f584fc9ab9addde3b435
tree45719452db34112382a1b3e83dc648abe45eac70
parent5cad2c56c49ed0874c0eed5ddc808d8f1ae74924
ext4: Remove 65000 subdirectory limit

This patch adds support to ext4 for allowing more than 65000
subdirectories. Currently the maximum number of subdirectories is capped
at 32000.

If we exceed 65000 subdirectories in an htree directory it sets the
inode link count to 1 and no longer counts subdirectories.  The
directory link count is not actually used when determining if a
directory is empty, as that only counts subdirectories and not regular
files that might be in there.

A EXT4_FEATURE_RO_COMPAT_DIR_NLINK flag has been added and it is set if
the subdir count for any directory crosses 65000. A later fsck will clear
EXT4_FEATURE_RO_COMPAT_DIR_NLINK if there are no longer any directory
with >65000 subdirs.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/namei.c
include/linux/ext4_fs.h