summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/attr.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2026-01-23 09:27:33 -0800
committerSasha Levin <sashal@kernel.org>2026-03-04 07:20:19 -0500
commit2b1b1734beeabd107317b00762eab5b6654c3bf4 (patch)
treeccee889f3de836003e07bc6ab77b5cc0ffa984aa /fs/xfs/scrub/attr.c
parentd08976725355b9d54d8332fce223fa281cc304a5 (diff)
xfs: fix remote xattr valuelblk check
[ Upstream commit bd3138e8912c9db182eac5fed1337645a98b7a4f ] In debugging other problems with generic/753, it turns out that it's possible for the system go to down in the middle of a remote xattr set operation such that the leaf block entry is marked incomplete and valueblk is set to zero. Make this no longer a failure. Cc: <stable@vger.kernel.org> # v4.15 Fixes: 13791d3b833428 ("xfs: scrub extended attribute leaf space") Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/attr.c')
-rw-r--r--fs/xfs/scrub/attr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c
index 9faddb334a2c..558f44ccb13f 100644
--- a/fs/xfs/scrub/attr.c
+++ b/fs/xfs/scrub/attr.c
@@ -285,7 +285,10 @@ xchk_xattr_entry(
rentry = xfs_attr3_leaf_name_remote(leaf, idx);
namesize = xfs_attr_leaf_entsize_remote(rentry->namelen);
name_end = (char *)rentry + namesize;
- if (rentry->namelen == 0 || rentry->valueblk == 0)
+ if (rentry->namelen == 0)
+ xchk_da_set_corrupt(ds, level);
+ if (rentry->valueblk == 0 &&
+ !(ent->flags & XFS_ATTR_INCOMPLETE))
xchk_da_set_corrupt(ds, level);
}
if (name_end > buf_end)