summaryrefslogtreecommitdiff
path: root/e2fsck/problem.h
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@dilger.ca>2018-06-22 18:08:54 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-06-22 18:08:54 -0400
commit1a8015773a9316ee90f713c275fb3a38731735e4 (patch)
tree0cf0538120d4faca5a099463d82f946532aedd78 /e2fsck/problem.h
parentc759616b8740a25e3e51e4add8df140514ff32ba (diff)
downloade2fsprogs-1a8015773a9316ee90f713c275fb3a38731735e4.tar.gz
e2fsck: set dir_nlink feature if large dir exists
If there is a directory with more than EXT2_LINK_MAX (65000) subdirectories, but the DIR_NLINK feature is not set in the superblock, the feature should be set before continuing on to change the on-disk directory link count to 1. While most filesystems should have DIR_NLINK set (it was set by default for all ext4 filesystems, and all kernels between 2.6.23 and 4.12 automatically set it if the directory link count grew too large), it is possible that this flag is lost due to disk corruption or for an upgraded filesystem. We no longer want kernels to automatically enable features. Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=196405 Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'e2fsck/problem.h')
-rw-r--r--e2fsck/problem.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/e2fsck/problem.h b/e2fsck/problem.h
index b6bca668..7db122ab 100644
--- a/e2fsck/problem.h
+++ b/e2fsck/problem.h
@@ -1139,6 +1139,9 @@ struct problem_context {
/* Extended attribute inode ref count wrong */
#define PR_4_EA_INODE_REF_COUNT 0x040005
+/* directory exceeds max links, but no DIR_NLINK feature in superblock */
+#define PR_4_DIR_NLINK_FEATURE 0x040006
+
/*
* Pass 5 errors
*/