From fa32d172c5a4f55edf3fbe94d434b933b049b3a4 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 14 Jul 2022 11:06:54 -0700 Subject: xfs: repair extended attributes If the extended attributes look bad, try to sift through the rubble to find whatever keys/values we can, stage a new attribute structure in a temporary file and use the atomic extent swapping mechanism to commit the results in bulk. Signed-off-by: Darrick J. Wong --- fs/xfs/scrub/xfarray.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/xfs/scrub/xfarray.h') diff --git a/fs/xfs/scrub/xfarray.h b/fs/xfs/scrub/xfarray.h index 259556bde465..4e11dc884a11 100644 --- a/fs/xfs/scrub/xfarray.h +++ b/fs/xfs/scrub/xfarray.h @@ -45,6 +45,8 @@ int xfarray_unset(struct xfarray *array, xfarray_idx_t idx); int xfarray_store(struct xfarray *array, xfarray_idx_t idx, const void *ptr); int xfarray_store_anywhere(struct xfarray *array, const void *ptr); bool xfarray_element_is_null(struct xfarray *array, const void *ptr); +void xfarray_truncate(struct xfarray *array); +long long xfarray_bytes(struct xfarray *array); /* * Load an array element, but zero the buffer if there's no data because we -- cgit v1.2.3