kalpak@clusterfs.com
2007-Jan-31 13:41 UTC
[Lustre-devel] [Bug 3244] allow more than 32000 subdirectories
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=3244 Created an attachment (id=9464) Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: --> (https://bugzilla.lustre.org/attachment.cgi?id=9464&action=view) Changes to e2fsck e2fsck uses a very different algorithm to calculate inode counts (& links) efficiently. A ''single'' bitmap is used to indicate which inodes have a link count of 1. If an inode has a link count greater than 1, then it is stored on a linked list. A ''multiple'' bitmap is used to indicate which inodes are present in the linked list. ext2fs_icount_increment() is modified such that if nlink count (el->count) becomes greater than EXT2_LINK_MAX(65000), then it is set to 1. Also when an inode belongs to ''multiple'' list (has more than 1 links), then its el->count is incremented only if it is not equal to 1.
adilger@clusterfs.com
2007-Jan-31 20:48 UTC
[Lustre-devel] [Bug 3244] allow more than 32000 subdirectories
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=3244 What |Removed |Added ---------------------------------------------------------------------------- Attachment #9464|review?(adilger@clusterfs.co|review+ Flag|m) | (From update of attachment 9464) This looks good, but please note that the EXT2_LINK_MAX part is already in the 1.39-WIP patch in e2fsprogs-cfs3, which means that it is also in the upstream code. The 1.39-WIP patch also holds the #define for RO_COMPAT_DIR_NLINK. The one thing that is missing is the fix for bug 6472, where e2fsck shouldn''t report an error for a directory with i_nlink = 1 (this can happen if the directory is > 65000 subdirs and they are then removed but the parent directory is not). Can you please make a test case for e2fsprogs (Girish knows how to do this if you need help). The test case should contain an empty directory with i_nlink 1, and a directory with > 65000 subdirectories.
kalpak@clusterfs.com
2007-Feb-01 04:24 UTC
[Lustre-devel] [Bug 3244] allow more than 32000 subdirectories
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=3244 Created an attachment (id=9469) Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: --> (https://bugzilla.lustre.org/attachment.cgi?id=9469&action=view) Changes to e2fsck for condition when directory has link count of 1, but all subdirectories are deleted. This patch uses the logic that a directory can have a nlink = 1, only if the subdirectory count had ever crossed 65000. So we check that if inode is a directory and its link_count as read from disk is 1, then we do not report BAD_REF_COUNT problem. Even if the link count for a directory has become 1 due to corruption instead of subdir count exceeding 65000, it will not cause any further corruption.