Skip to content
/ linux Public

Commit b8a4a0c

Browse files
Darrick J. WongSasha Levin
authored andcommitted
xfs: fix remote xattr valuelblk check
[ Upstream commit bd3138e ] 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: 13791d3 ("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>
1 parent a396b3d commit b8a4a0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/xfs/scrub/attr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ xchk_xattr_entry(
290290
rentry = xfs_attr3_leaf_name_remote(leaf, idx);
291291
namesize = xfs_attr_leaf_entsize_remote(rentry->namelen);
292292
name_end = (char *)rentry + namesize;
293-
if (rentry->namelen == 0 || rentry->valueblk == 0)
293+
if (rentry->namelen == 0)
294+
xchk_da_set_corrupt(ds, level);
295+
if (rentry->valueblk == 0 &&
296+
!(ent->flags & XFS_ATTR_INCOMPLETE))
294297
xchk_da_set_corrupt(ds, level);
295298
}
296299
if (name_end > buf_end)

0 commit comments

Comments
 (0)