ext3/ext4 migration problem with dir_nlink feature flag
Hi,
I found a bug which returns EIO by file access on ext3 (was ext4) whose dir_nlink feature flag is removed and has more than 64000 directories.
Kernel: 2.6.36-rc6, e2fsprogs: 1.41.2
Steps to reproduce are as follows:
1. Create ext4 which does not have extent and flex_bg feature flags (Because this fs will be mounted as ext3 in step 3), then create more than 64000 directories.
Therefore dir_nlink feature flag is set and link count becomes 1.
2. Remove dir_nlink feature flag with tune2fs command (e.g. tune2fs -O ^dir_nlink /dev/sdx).
3. Mount ext4 as ext3, then remove subdir (Link: 1->0). We cannot access parent directory, because link count goes wrong.
We should disallow tune2fs command to remove dir_nlink feature flag.
Regards,
Akira Fujita
Hi,
Unfortunately, this bug still exists in 2.6.38-rc1 with e2fsprogs-1.41.13. Attached test program can reproduce this bug easily.
Please have a look and try.
Regards,
Akira Fujita
Quoted 26 lines · Akira Fujita
Hi,
I found a bug which returns EIO by file access on ext3 (was ext4) whose
dir_nlinkfeature flag is removed and has more than 64000 directories.
Kernel: 2.6.36-rc6, e2fsprogs: 1.41.2
Steps to reproduce are as follows:1. Create ext4 which does not have extent and
flex_bgfeature flags (Because this fs will be mounted as ext3 in step 3), then create more than 64000 directories.
Thereforedir_nlinkfeature flag is set and link count becomes 1.
2. Removedir_nlinkfeature flag with tune2fs command (e.g. tune2fs -O ^dir_nlink/dev/sdx).
3. Mount ext4 as ext3, then remove subdir (Link: 1->0). We cannot access parent directory, because link count goes wrong.We should disallow tune2fs command to remove
dir_nlinkfeature flag.Regards,
Akira FujitaSignature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html