Skip to content

Commit 44af6c7

Browse files
author
Darrick J. Wong
committed
xfs: don't load local xattr values during scrub
Local extended attributes store their values within the same leaf block. There's no header for the values themselves, nor are they separately checksummed. Hence we can save a bit of time in the attr scrubber by not wasting time retrieving the values. Regrettably, shortform attributes do not set XFS_ATTR_LOCAL so this offers us no advantage there, but at least there are very few attrs in that case. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
1 parent 674f0d0 commit 44af6c7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

fs/xfs/scrub/attr.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ xchk_xattr_listent(
200200
goto fail_xref;
201201
}
202202

203+
/*
204+
* Local xattr values are stored in the attr leaf block, so we don't
205+
* need to retrieve the value from a remote block to detect corruption
206+
* problems.
207+
*/
208+
if (flags & XFS_ATTR_LOCAL)
209+
goto fail_xref;
210+
203211
/*
204212
* Try to allocate enough memory to extrat the attr value. If that
205213
* doesn't work, we overload the seen_enough variable to convey

0 commit comments

Comments
 (0)