Skip to content

Commit bd3138e

Browse files
author
Darrick J. Wong
committed
xfs: fix remote xattr valuelblk check
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>
1 parent 6fed827 commit bd3138e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

fs/xfs/scrub/attr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,10 @@ xchk_xattr_entry(
338338
rentry = xfs_attr3_leaf_name_remote(leaf, idx);
339339
namesize = xfs_attr_leaf_entsize_remote(rentry->namelen);
340340
name_end = (char *)rentry + namesize;
341-
if (rentry->namelen == 0 || rentry->valueblk == 0)
341+
if (rentry->namelen == 0)
342+
xchk_da_set_corrupt(ds, level);
343+
if (rentry->valueblk == 0 &&
344+
!(ent->flags & XFS_ATTR_INCOMPLETE))
342345
xchk_da_set_corrupt(ds, level);
343346
}
344347
if (name_end > buf_end)

0 commit comments

Comments
 (0)