Hi, Zhang Xiliang wrote:
Hi, I creat 65537 long directories and failed when the block size is 1024. # mkfs.ext4dev -b 1024 -I 256 /dev/hda3 # tune2fs -E test_fs -O extents /dev/hda3 # mount -t ext4dev /dev/hda3 /mnt # ./create_long_dirs 65537 /mnt The code of create_long_dirs.c:
ext4 filesystem cannot make over 65000 links toward a file. (ext3 filesystem cannot make over 32000 links toward a file.) This test makes over 65000 links toward /mnt-directory. (Creating 65000 sub-directories makes 65000 links toward /mnt-directory.) static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode) { handle_t *handle; struct inode *inode; struct buffer_head *dir_block; struct ext4_dir_entry_2 *de; int err, retries = 0; if (EXT4_DIR_LINK_MAX(dir)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -EMLINK; This limit is ext4's specification. Regards, Toshiyuki Okajima -- 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