Skip to content

Commit 20adb1e

Browse files
Darrick J. Wonggregkh
authored andcommitted
xfs: revert commit 44af6c7
commit 2a00939 upstream. [backport: resolve conflicts due to new xattr walk helper] In my haste to fix what I thought was a performance problem in the attr scrub code, I neglected to notice that the xfs_attr_get_ilocked also had the effect of checking that attributes can actually be looked up through the attr dabtree. Fix this. Fixes: 44af6c7 ("xfs: don't load local xattr values during scrub") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Acked-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5689d23 commit 20adb1e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

fs/xfs/scrub/attr.c

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

202-
/*
203-
* Local xattr values are stored in the attr leaf block, so we don't
204-
* need to retrieve the value from a remote block to detect corruption
205-
* problems.
206-
*/
207-
if (flags & XFS_ATTR_LOCAL)
208-
goto fail_xref;
209-
210202
/*
211203
* Try to allocate enough memory to extrat the attr value. If that
212204
* doesn't work, we overload the seen_enough variable to convey
@@ -222,6 +214,11 @@ xchk_xattr_listent(
222214

223215
args.value = ab->value;
224216

217+
/*
218+
* Get the attr value to ensure that lookup can find this attribute
219+
* through the dabtree indexing and that remote value retrieval also
220+
* works correctly.
221+
*/
225222
error = xfs_attr_get_ilocked(&args);
226223
/* ENODATA means the hash lookup failed and the attr is bad */
227224
if (error == -ENODATA)

0 commit comments

Comments
 (0)