summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/attr.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-08-30 15:44:55 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-22 21:35:03 -0800
commitfbaf403dac73d7e3bf07c9ff8e041eae761c50c0 (patch)
tree7bc62c0b4f4973b3a6fd868d855a5c0e32e7bd20 /fs/xfs/scrub/attr.h
parent300f4a38b93b1705abd6dd48a510e6b555701531 (diff)
xfs: repair extended attributes
If the extended attributes look bad, try to sift through the rubble to find whatever keys/values we can, zap the attr tree, and re-add the values. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/attr.h')
-rw-r--r--fs/xfs/scrub/attr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/scrub/attr.h b/fs/xfs/scrub/attr.h
index 13a1d2e8424d..b2d758953300 100644
--- a/fs/xfs/scrub/attr.h
+++ b/fs/xfs/scrub/attr.h
@@ -37,6 +37,16 @@ xchk_xattr_valuebuf(
return ab->buf;
}
+/* A place to store attribute names. */
+static inline unsigned char *
+xchk_xattr_namebuf(
+ struct xfs_scrub *sc)
+{
+ struct xchk_xattr_buf *ab = sc->buf;
+
+ return (unsigned char *)ab->buf + ab->sz - XATTR_NAME_MAX - 1;
+}
+
/* A bitmap of space usage computed by walking an attr leaf block. */
static inline unsigned long *
xchk_xattr_usedmap(