Skip to content

Commit 73c34b0

Browse files
Darrick J. WongChandan Babu R
authored andcommitted
xfs: attr forks require attr, not attr2
It turns out that I misunderstood the difference between the attr and attr2 feature bits. "attr" means that at some point an attr fork was created somewhere in the filesystem. "attr2" means that inodes have variable-sized forks, but says nothing about whether or not there actually /are/ attr forks in the system. If we have an attr fork, we only need to check that attr is set. Fixes: 99d9d8d ("xfs: scrub inode block mappings") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 parent 7c626ce commit 73c34b0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/xfs/scrub/bmap.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,13 @@ xchk_bmap(
938938
}
939939
break;
940940
case XFS_ATTR_FORK:
941-
if (!xfs_has_attr(mp) && !xfs_has_attr2(mp))
941+
/*
942+
* "attr" means that an attr fork was created at some point in
943+
* the life of this filesystem. "attr2" means that inodes have
944+
* variable-sized data/attr fork areas. Hence we only check
945+
* attr here.
946+
*/
947+
if (!xfs_has_attr(mp))
942948
xchk_ino_set_corrupt(sc, sc->ip->i_ino);
943949
break;
944950
default:

0 commit comments

Comments
 (0)