All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 4/6] xfs: zap broken inode forks
Date: Thu, 25 May 2023 17:53:08 -0700	[thread overview]
Message-ID: <168506058367.3730405.14648957819809852380.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <168506058301.3730405.12262241466147528228.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <djwong@kernel.org>

Determine if inode fork damage is responsible for the inode being unable
to pass the ifork verifiers in xfs_iget and zap the fork contents if
this is true.  Once this is done the fork will be empty but we'll be
able to construct an in-core inode, and a subsequent call to the inode
fork repair ioctl will search the rmapbt to rebuild the records that
were in the fork.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/libxfs/xfs_attr_leaf.c      |   32 +-
 fs/xfs/libxfs/xfs_attr_leaf.h      |    2 
 fs/xfs/libxfs/xfs_bmap.c           |   22 +
 fs/xfs/libxfs/xfs_bmap.h           |    2 
 fs/xfs/libxfs/xfs_dir2_priv.h      |    2 
 fs/xfs/libxfs/xfs_dir2_sf.c        |   29 +-
 fs/xfs/libxfs/xfs_shared.h         |    1 
 fs/xfs/libxfs/xfs_symlink_remote.c |   21 +
 fs/xfs/scrub/inode_repair.c        |  688 ++++++++++++++++++++++++++++++++++++
 fs/xfs/scrub/trace.h               |   42 ++
 10 files changed, 804 insertions(+), 37 deletions(-)


diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
index beee51ad75ce..40aba0a9d339 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.c
+++ b/fs/xfs/libxfs/xfs_attr_leaf.c
@@ -1040,23 +1040,16 @@ xfs_attr_shortform_allfit(
 	return xfs_attr_shortform_bytesfit(dp, bytes);
 }
 
-/* Verify the consistency of an inline attribute fork. */
+/* Verify the consistency of a raw inline attribute fork. */
 xfs_failaddr_t
-xfs_attr_shortform_verify(
-	struct xfs_inode		*ip)
+xfs_attr_shortform_verify_struct(
+	struct xfs_attr_shortform	*sfp,
+	size_t				size)
 {
-	struct xfs_attr_shortform	*sfp;
 	struct xfs_attr_sf_entry	*sfep;
 	struct xfs_attr_sf_entry	*next_sfep;
 	char				*endp;
-	struct xfs_ifork		*ifp;
 	int				i;
-	int64_t				size;
-
-	ASSERT(ip->i_af.if_format == XFS_DINODE_FMT_LOCAL);
-	ifp = xfs_ifork_ptr(ip, XFS_ATTR_FORK);
-	sfp = (struct xfs_attr_shortform *)ifp->if_u1.if_data;
-	size = ifp->if_bytes;
 
 	/*
 	 * Give up if the attribute is way too short.
@@ -1116,6 +1109,23 @@ xfs_attr_shortform_verify(
 	return NULL;
 }
 
+/* Verify the consistency of an inline attribute fork. */
+xfs_failaddr_t
+xfs_attr_shortform_verify(
+	struct xfs_inode		*ip)
+{
+	struct xfs_attr_shortform	*sfp;
+	struct xfs_ifork		*ifp;
+	int64_t				size;
+
+	ASSERT(ip->i_af.if_format == XFS_DINODE_FMT_LOCAL);
+	ifp = xfs_ifork_ptr(ip, XFS_ATTR_FORK);
+	sfp = (struct xfs_attr_shortform *)ifp->if_u1.if_data;
+	size = ifp->if_bytes;
+
+	return xfs_attr_shortform_verify_struct(sfp, size);
+}
+
 /*
  * Convert a leaf attribute list to shortform attribute list
  */
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.h b/fs/xfs/libxfs/xfs_attr_leaf.h
index 368f4d9fa1d5..0711a448f64c 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.h
+++ b/fs/xfs/libxfs/xfs_attr_leaf.h
@@ -56,6 +56,8 @@ int	xfs_attr_sf_findname(struct xfs_da_args *args,
 			     unsigned int *basep);
 int	xfs_attr_shortform_allfit(struct xfs_buf *bp, struct xfs_inode *dp);
 int	xfs_attr_shortform_bytesfit(struct xfs_inode *dp, int bytes);
+xfs_failaddr_t xfs_attr_shortform_verify_struct(struct xfs_attr_shortform *sfp,
+		size_t size);
 xfs_failaddr_t xfs_attr_shortform_verify(struct xfs_inode *ip);
 void	xfs_attr_fork_remove(struct xfs_inode *ip, struct xfs_trans *tp);
 
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index cd8870a16fd1..3cbc4d0db47f 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -6188,19 +6188,18 @@ xfs_bmap_finish_one(
 	return error;
 }
 
-/* Check that an inode's extent does not have invalid flags or bad ranges. */
+/* Check that an extent does not have invalid flags or bad ranges. */
 xfs_failaddr_t
-xfs_bmap_validate_extent(
-	struct xfs_inode	*ip,
+xfs_bmap_validate_extent_raw(
+	struct xfs_mount	*mp,
+	bool			rtfile,
 	int			whichfork,
 	struct xfs_bmbt_irec	*irec)
 {
-	struct xfs_mount	*mp = ip->i_mount;
-
 	if (!xfs_verify_fileext(mp, irec->br_startoff, irec->br_blockcount))
 		return __this_address;
 
-	if (XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK) {
+	if (rtfile && whichfork == XFS_DATA_FORK) {
 		if (!xfs_verify_rtext(mp, irec->br_startblock,
 					  irec->br_blockcount))
 			return __this_address;
@@ -6230,3 +6229,14 @@ xfs_bmap_intent_destroy_cache(void)
 	kmem_cache_destroy(xfs_bmap_intent_cache);
 	xfs_bmap_intent_cache = NULL;
 }
+
+/* Check that an inode's extent does not have invalid flags or bad ranges. */
+xfs_failaddr_t
+xfs_bmap_validate_extent(
+	struct xfs_inode	*ip,
+	int			whichfork,
+	struct xfs_bmbt_irec	*irec)
+{
+	return xfs_bmap_validate_extent_raw(ip->i_mount,
+			XFS_IS_REALTIME_INODE(ip), whichfork, irec);
+}
diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h
index e33470e39728..8518324db285 100644
--- a/fs/xfs/libxfs/xfs_bmap.h
+++ b/fs/xfs/libxfs/xfs_bmap.h
@@ -263,6 +263,8 @@ static inline uint32_t xfs_bmap_fork_to_state(int whichfork)
 	}
 }
 
+xfs_failaddr_t xfs_bmap_validate_extent_raw(struct xfs_mount *mp, bool rtfile,
+		int whichfork, struct xfs_bmbt_irec *irec);
 xfs_failaddr_t xfs_bmap_validate_extent(struct xfs_inode *ip, int whichfork,
 		struct xfs_bmbt_irec *irec);
 int xfs_bmap_complain_bad_rec(struct xfs_inode *ip, int whichfork,
diff --git a/fs/xfs/libxfs/xfs_dir2_priv.h b/fs/xfs/libxfs/xfs_dir2_priv.h
index 7404a9ff1a92..b10859a43776 100644
--- a/fs/xfs/libxfs/xfs_dir2_priv.h
+++ b/fs/xfs/libxfs/xfs_dir2_priv.h
@@ -175,6 +175,8 @@ extern int xfs_dir2_sf_create(struct xfs_da_args *args, xfs_ino_t pino);
 extern int xfs_dir2_sf_lookup(struct xfs_da_args *args);
 extern int xfs_dir2_sf_removename(struct xfs_da_args *args);
 extern int xfs_dir2_sf_replace(struct xfs_da_args *args);
+extern xfs_failaddr_t xfs_dir2_sf_verify_struct(struct xfs_mount *mp,
+		struct xfs_dir2_sf_hdr *sfp, int64_t size);
 extern xfs_failaddr_t xfs_dir2_sf_verify(struct xfs_inode *ip);
 int xfs_dir2_sf_entsize(struct xfs_mount *mp,
 		struct xfs_dir2_sf_hdr *hdr, int len);
diff --git a/fs/xfs/libxfs/xfs_dir2_sf.c b/fs/xfs/libxfs/xfs_dir2_sf.c
index 8cd37e6e9d38..008904658524 100644
--- a/fs/xfs/libxfs/xfs_dir2_sf.c
+++ b/fs/xfs/libxfs/xfs_dir2_sf.c
@@ -706,12 +706,11 @@ xfs_dir2_sf_check(
 
 /* Verify the consistency of an inline directory. */
 xfs_failaddr_t
-xfs_dir2_sf_verify(
-	struct xfs_inode		*ip)
+xfs_dir2_sf_verify_struct(
+	struct xfs_mount		*mp,
+	struct xfs_dir2_sf_hdr		*sfp,
+	int64_t				size)
 {
-	struct xfs_mount		*mp = ip->i_mount;
-	struct xfs_ifork		*ifp = xfs_ifork_ptr(ip, XFS_DATA_FORK);
-	struct xfs_dir2_sf_hdr		*sfp;
 	struct xfs_dir2_sf_entry	*sfep;
 	struct xfs_dir2_sf_entry	*next_sfep;
 	char				*endp;
@@ -719,15 +718,9 @@ xfs_dir2_sf_verify(
 	int				i;
 	int				i8count;
 	int				offset;
-	int64_t				size;
 	int				error;
 	uint8_t				filetype;
 
-	ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL);
-
-	sfp = (struct xfs_dir2_sf_hdr *)ifp->if_u1.if_data;
-	size = ifp->if_bytes;
-
 	/*
 	 * Give up if the directory is way too short.
 	 */
@@ -803,6 +796,20 @@ xfs_dir2_sf_verify(
 	return NULL;
 }
 
+xfs_failaddr_t
+xfs_dir2_sf_verify(
+	struct xfs_inode		*ip)
+{
+	struct xfs_mount		*mp = ip->i_mount;
+	struct xfs_ifork		*ifp = xfs_ifork_ptr(ip, XFS_DATA_FORK);
+	struct xfs_dir2_sf_hdr		*sfp;
+
+	ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL);
+
+	sfp = (struct xfs_dir2_sf_hdr *)ifp->if_u1.if_data;
+	return xfs_dir2_sf_verify_struct(mp, sfp, ifp->if_bytes);
+}
+
 /*
  * Create a new (shortform) directory.
  */
diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h
index c4381388c0c1..57a52fa76a49 100644
--- a/fs/xfs/libxfs/xfs_shared.h
+++ b/fs/xfs/libxfs/xfs_shared.h
@@ -139,6 +139,7 @@ bool xfs_symlink_hdr_ok(xfs_ino_t ino, uint32_t offset,
 			uint32_t size, struct xfs_buf *bp);
 void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp,
 				 struct xfs_inode *ip, struct xfs_ifork *ifp);
+xfs_failaddr_t xfs_symlink_sf_verify_struct(void *sfp, int64_t size);
 xfs_failaddr_t xfs_symlink_shortform_verify(struct xfs_inode *ip);
 
 /* Computed inode geometry for the filesystem. */
diff --git a/fs/xfs/libxfs/xfs_symlink_remote.c b/fs/xfs/libxfs/xfs_symlink_remote.c
index bdc777b9ec4a..7660a95b1ea9 100644
--- a/fs/xfs/libxfs/xfs_symlink_remote.c
+++ b/fs/xfs/libxfs/xfs_symlink_remote.c
@@ -201,16 +201,12 @@ xfs_symlink_local_to_remote(
  * does not do on-disk format checks.
  */
 xfs_failaddr_t
-xfs_symlink_shortform_verify(
-	struct xfs_inode	*ip)
+xfs_symlink_sf_verify_struct(
+	void			*sfp,
+	int64_t			size)
 {
-	struct xfs_ifork	*ifp = xfs_ifork_ptr(ip, XFS_DATA_FORK);
-	char			*sfp = (char *)ifp->if_u1.if_data;
-	int			size = ifp->if_bytes;
 	char			*endp = sfp + size;
 
-	ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL);
-
 	/*
 	 * Zero length symlinks should never occur in memory as they are
 	 * never allowed to exist on disk.
@@ -231,3 +227,14 @@ xfs_symlink_shortform_verify(
 		return __this_address;
 	return NULL;
 }
+
+xfs_failaddr_t
+xfs_symlink_shortform_verify(
+	struct xfs_inode	*ip)
+{
+	struct xfs_ifork	*ifp = xfs_ifork_ptr(ip, XFS_DATA_FORK);
+
+	ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL);
+
+	return xfs_symlink_sf_verify_struct(ifp->if_u1.if_data, ifp->if_bytes);
+}
diff --git a/fs/xfs/scrub/inode_repair.c b/fs/xfs/scrub/inode_repair.c
index d48a2b4acc80..fbe4eeff82f0 100644
--- a/fs/xfs/scrub/inode_repair.c
+++ b/fs/xfs/scrub/inode_repair.c
@@ -22,14 +22,19 @@
 #include "xfs_ialloc.h"
 #include "xfs_da_format.h"
 #include "xfs_reflink.h"
+#include "xfs_alloc.h"
 #include "xfs_rmap.h"
+#include "xfs_rmap_btree.h"
 #include "xfs_bmap.h"
+#include "xfs_bmap_btree.h"
 #include "xfs_bmap_util.h"
 #include "xfs_dir2.h"
 #include "xfs_dir2_priv.h"
 #include "xfs_quota_defs.h"
 #include "xfs_quota.h"
 #include "xfs_ag.h"
+#include "xfs_attr_leaf.h"
+#include "xfs_log_priv.h"
 #include "scrub/xfs_scrub.h"
 #include "scrub/scrub.h"
 #include "scrub/common.h"
@@ -59,6 +64,28 @@ struct xrep_inode {
 	struct xfs_imap		imap;
 
 	struct xfs_scrub	*sc;
+
+	/* Blocks in use on the data device by data extents or bmbt blocks. */
+	xfs_rfsblock_t		data_blocks;
+
+	/* Blocks in use on the rt device. */
+	xfs_rfsblock_t		rt_blocks;
+
+	/* Blocks in use by the attr fork. */
+	xfs_rfsblock_t		attr_blocks;
+
+	/* Number of data device extents for the data fork. */
+	xfs_extnum_t		data_extents;
+
+	/*
+	 * Number of realtime device extents for the data fork.  If
+	 * data_extents and rt_extents indicate that the data fork has extents
+	 * on both devices, we'll just back away slowly.
+	 */
+	xfs_extnum_t		rt_extents;
+
+	/* Number of (data device) extents for the attr fork. */
+	xfs_aextnum_t		attr_extents;
 };
 
 /* Setup function for inode repair. */
@@ -186,7 +213,8 @@ xrep_dinode_mode(
 STATIC void
 xrep_dinode_flags(
 	struct xfs_scrub	*sc,
-	struct xfs_dinode	*dip)
+	struct xfs_dinode	*dip,
+	bool			isrt)
 {
 	struct xfs_mount	*mp = sc->mp;
 	uint64_t		flags2;
@@ -199,6 +227,11 @@ xrep_dinode_flags(
 	flags = be16_to_cpu(dip->di_flags);
 	flags2 = be64_to_cpu(dip->di_flags2);
 
+	if (isrt)
+		flags |= XFS_DIFLAG_REALTIME;
+	else
+		flags &= ~XFS_DIFLAG_REALTIME;
+
 	if (xfs_has_reflink(mp) && S_ISREG(mode))
 		flags2 |= XFS_DIFLAG2_REFLINK;
 	else
@@ -353,6 +386,651 @@ xrep_dinode_extsize_hints(
 	}
 }
 
+/* Count extents and blocks for an inode given an rmap. */
+STATIC int
+xrep_dinode_walk_rmap(
+	struct xfs_btree_cur		*cur,
+	const struct xfs_rmap_irec	*rec,
+	void				*priv)
+{
+	struct xrep_inode		*ri = priv;
+	int				error = 0;
+
+	if (xchk_should_terminate(ri->sc, &error))
+		return error;
+
+	/* We only care about this inode. */
+	if (rec->rm_owner != ri->sc->sm->sm_ino)
+		return 0;
+
+	if (rec->rm_flags & XFS_RMAP_ATTR_FORK) {
+		ri->attr_blocks += rec->rm_blockcount;
+		if (!(rec->rm_flags & XFS_RMAP_BMBT_BLOCK))
+			ri->attr_extents++;
+
+		return 0;
+	}
+
+	ri->data_blocks += rec->rm_blockcount;
+	if (!(rec->rm_flags & XFS_RMAP_BMBT_BLOCK))
+		ri->data_extents++;
+
+	return 0;
+}
+
+/* Count extents and blocks for an inode from all AG rmap data. */
+STATIC int
+xrep_dinode_count_ag_rmaps(
+	struct xrep_inode	*ri,
+	struct xfs_perag	*pag)
+{
+	struct xfs_btree_cur	*cur;
+	struct xfs_buf		*agf;
+	int			error;
+
+	error = xfs_alloc_read_agf(pag, ri->sc->tp, 0, &agf);
+	if (error)
+		return error;
+
+	cur = xfs_rmapbt_init_cursor(ri->sc->mp, ri->sc->tp, agf, pag);
+	error = xfs_rmap_query_all(cur, xrep_dinode_walk_rmap, ri);
+	xfs_btree_del_cursor(cur, error);
+	xfs_trans_brelse(ri->sc->tp, agf);
+	return error;
+}
+
+/* Count extents and blocks for a given inode from all rmap data. */
+STATIC int
+xrep_dinode_count_rmaps(
+	struct xrep_inode	*ri)
+{
+	struct xfs_perag	*pag;
+	xfs_agnumber_t		agno;
+	int			error;
+
+	if (!xfs_has_rmapbt(ri->sc->mp) || xfs_has_realtime(ri->sc->mp))
+		return -EOPNOTSUPP;
+
+	for_each_perag(ri->sc->mp, agno, pag) {
+		error = xrep_dinode_count_ag_rmaps(ri, pag);
+		if (error) {
+			xfs_perag_rele(pag);
+			return error;
+		}
+	}
+
+	/* Can't have extents on both the rt and the data device. */
+	if (ri->data_extents && ri->rt_extents)
+		return -EFSCORRUPTED;
+
+	trace_xrep_dinode_count_rmaps(ri->sc,
+			ri->data_blocks, ri->rt_blocks, ri->attr_blocks,
+			ri->data_extents, ri->rt_extents, ri->attr_extents);
+	return 0;
+}
+
+/* Return true if this extents-format ifork looks like garbage. */
+STATIC bool
+xrep_dinode_bad_extents_fork(
+	struct xfs_scrub	*sc,
+	struct xfs_dinode	*dip,
+	int			dfork_size,
+	int			whichfork)
+{
+	struct xfs_bmbt_irec	new;
+	struct xfs_bmbt_rec	*dp;
+	bool			isrt;
+	int			i;
+	int			nex;
+	int			fork_size;
+
+	nex = xfs_dfork_nextents(dip, whichfork);
+	fork_size = nex * sizeof(struct xfs_bmbt_rec);
+	if (fork_size < 0 || fork_size > dfork_size)
+		return true;
+	if (whichfork == XFS_ATTR_FORK && nex > ((uint16_t)-1U))
+		return true;
+	dp = XFS_DFORK_PTR(dip, whichfork);
+
+	isrt = dip->di_flags & cpu_to_be16(XFS_DIFLAG_REALTIME);
+	for (i = 0; i < nex; i++, dp++) {
+		xfs_failaddr_t	fa;
+
+		xfs_bmbt_disk_get_all(dp, &new);
+		fa = xfs_bmap_validate_extent_raw(sc->mp, isrt, whichfork,
+				&new);
+		if (fa)
+			return true;
+	}
+
+	return false;
+}
+
+/* Return true if this btree-format ifork looks like garbage. */
+STATIC bool
+xrep_dinode_bad_bmbt_fork(
+	struct xfs_scrub	*sc,
+	struct xfs_dinode	*dip,
+	int			dfork_size,
+	int			whichfork)
+{
+	struct xfs_bmdr_block	*dfp;
+	int			i;
+	int			dmxr;
+	int			nrecs;
+	int			level;
+
+	if (xfs_dfork_nextents(dip, whichfork) <=
+			dfork_size / sizeof(struct xfs_bmbt_rec))
+		return true;
+
+	if (dfork_size < sizeof(struct xfs_bmdr_block))
+		return true;
+
+	dfp = XFS_DFORK_PTR(dip, whichfork);
+	nrecs = be16_to_cpu(dfp->bb_numrecs);
+	level = be16_to_cpu(dfp->bb_level);
+
+	if (nrecs == 0 || XFS_BMDR_SPACE_CALC(nrecs) > dfork_size)
+		return true;
+	if (level == 0 || level >= XFS_BM_MAXLEVELS(sc->mp, whichfork))
+		return true;
+
+	dmxr = xfs_bmdr_maxrecs(dfork_size, 0);
+	for (i = 1; i <= nrecs; i++) {
+		struct xfs_bmbt_key	*fkp;
+		xfs_bmbt_ptr_t		*fpp;
+		xfs_fileoff_t		fileoff;
+		xfs_fsblock_t		fsbno;
+
+		fkp = XFS_BMDR_KEY_ADDR(dfp, i);
+		fileoff = be64_to_cpu(fkp->br_startoff);
+		if (!xfs_verify_fileoff(sc->mp, fileoff))
+			return true;
+
+		fpp = XFS_BMDR_PTR_ADDR(dfp, i, dmxr);
+		fsbno = be64_to_cpu(*fpp);
+		if (!xfs_verify_fsbno(sc->mp, fsbno))
+			return true;
+	}
+
+	return false;
+}
+
+/*
+ * Check the data fork for things that will fail the ifork verifiers or the
+ * ifork formatters.
+ */
+STATIC bool
+xrep_dinode_check_dfork(
+	struct xfs_scrub	*sc,
+	struct xfs_dinode	*dip,
+	uint16_t		mode)
+{
+	void			*dfork_ptr;
+	int64_t			data_size;
+	unsigned int		fmt;
+	int			dfork_size;
+
+	/*
+	 * Verifier functions take signed int64_t, so check for bogus negative
+	 * values first.
+	 */
+	data_size = be64_to_cpu(dip->di_size);
+	if (data_size < 0)
+		return true;
+
+	fmt = XFS_DFORK_FORMAT(dip, XFS_DATA_FORK);
+	switch (mode & S_IFMT) {
+	case S_IFIFO:
+	case S_IFCHR:
+	case S_IFBLK:
+	case S_IFSOCK:
+		if (fmt != XFS_DINODE_FMT_DEV)
+			return true;
+		break;
+	case S_IFREG:
+		if (fmt == XFS_DINODE_FMT_LOCAL)
+			return true;
+		fallthrough;
+	case S_IFLNK:
+	case S_IFDIR:
+		switch (fmt) {
+		case XFS_DINODE_FMT_LOCAL:
+		case XFS_DINODE_FMT_EXTENTS:
+		case XFS_DINODE_FMT_BTREE:
+			break;
+		default:
+			return true;
+		}
+		break;
+	default:
+		return true;
+	}
+
+	dfork_size = XFS_DFORK_SIZE(dip, sc->mp, XFS_DATA_FORK);
+	dfork_ptr = XFS_DFORK_PTR(dip, XFS_DATA_FORK);
+
+	switch (fmt) {
+	case XFS_DINODE_FMT_DEV:
+		break;
+	case XFS_DINODE_FMT_LOCAL:
+		/* dir/symlink structure cannot be larger than the fork */
+		if (data_size > dfork_size)
+			return true;
+		/* directory structure must pass verification. */
+		if (S_ISDIR(mode) && xfs_dir2_sf_verify_struct(sc->mp,
+						dfork_ptr, data_size) != NULL)
+			return true;
+		/* symlink structure must pass verification. */
+		if (S_ISLNK(mode) && xfs_symlink_sf_verify_struct(dfork_ptr,
+							   data_size) != NULL)
+			return true;
+		break;
+	case XFS_DINODE_FMT_EXTENTS:
+		if (xrep_dinode_bad_extents_fork(sc, dip, dfork_size,
+				XFS_DATA_FORK))
+			return true;
+		break;
+	case XFS_DINODE_FMT_BTREE:
+		if (xrep_dinode_bad_bmbt_fork(sc, dip, dfork_size,
+				XFS_DATA_FORK))
+			return true;
+		break;
+	default:
+		return true;
+	}
+
+	return false;
+}
+
+static void
+xrep_dinode_set_data_nextents(
+	struct xfs_dinode	*dip,
+	xfs_extnum_t		nextents)
+{
+	if (xfs_dinode_has_large_extent_counts(dip))
+		dip->di_big_nextents = cpu_to_be64(nextents);
+	else
+		dip->di_nextents = cpu_to_be32(nextents);
+}
+
+static void
+xrep_dinode_set_attr_nextents(
+	struct xfs_dinode	*dip,
+	xfs_extnum_t		nextents)
+{
+	if (xfs_dinode_has_large_extent_counts(dip))
+		dip->di_big_anextents = cpu_to_be32(nextents);
+	else
+		dip->di_anextents = cpu_to_be16(nextents);
+}
+
+/* Reset the data fork to something sane. */
+STATIC void
+xrep_dinode_zap_dfork(
+	struct xrep_inode	*ri,
+	struct xfs_dinode	*dip,
+	uint16_t		mode)
+{
+	struct xfs_scrub	*sc = ri->sc;
+
+	trace_xrep_dinode_zap_dfork(sc, dip);
+
+	xrep_dinode_set_data_nextents(dip, 0);
+
+	/* Special files always get reset to DEV */
+	switch (mode & S_IFMT) {
+	case S_IFIFO:
+	case S_IFCHR:
+	case S_IFBLK:
+	case S_IFSOCK:
+		dip->di_format = XFS_DINODE_FMT_DEV;
+		dip->di_size = 0;
+		return;
+	}
+
+	/*
+	 * If we have data extents, reset to an empty map and hope the user
+	 * will run the bmapbtd checker next.
+	 */
+	if (ri->data_extents || ri->rt_extents || S_ISREG(mode)) {
+		dip->di_format = XFS_DINODE_FMT_EXTENTS;
+		return;
+	}
+
+	/* Otherwise, reset the local format to the minimum. */
+	switch (mode & S_IFMT) {
+	case S_IFLNK:
+		xrep_dinode_zap_symlink(sc, dip);
+		break;
+	case S_IFDIR:
+		xrep_dinode_zap_dir(sc, dip);
+		break;
+	}
+}
+
+/*
+ * Check the attr fork for things that will fail the ifork verifiers or the
+ * ifork formatters.
+ */
+STATIC bool
+xrep_dinode_check_afork(
+	struct xfs_scrub		*sc,
+	struct xfs_dinode		*dip)
+{
+	struct xfs_attr_shortform	*afork_ptr;
+	size_t				attr_size;
+	int				afork_size;
+
+	if (XFS_DFORK_BOFF(dip) == 0)
+		return dip->di_aformat != XFS_DINODE_FMT_EXTENTS ||
+		       xfs_dfork_attr_extents(dip) != 0;
+
+	afork_size = XFS_DFORK_SIZE(dip, sc->mp, XFS_ATTR_FORK);
+	afork_ptr = XFS_DFORK_PTR(dip, XFS_ATTR_FORK);
+
+	switch (XFS_DFORK_FORMAT(dip, XFS_ATTR_FORK)) {
+	case XFS_DINODE_FMT_LOCAL:
+		/* Fork has to be large enough to extract the xattr size. */
+		if (afork_size < sizeof(struct xfs_attr_sf_hdr))
+			return true;
+
+		/* xattr structure cannot be larger than the fork */
+		attr_size = be16_to_cpu(afork_ptr->hdr.totsize);
+		if (attr_size > afork_size)
+			return true;
+
+		/* xattr structure must pass verification. */
+		return xfs_attr_shortform_verify_struct(afork_ptr,
+							attr_size) != NULL;
+	case XFS_DINODE_FMT_EXTENTS:
+		if (xrep_dinode_bad_extents_fork(sc, dip, afork_size,
+					XFS_ATTR_FORK))
+			return true;
+		break;
+	case XFS_DINODE_FMT_BTREE:
+		if (xrep_dinode_bad_bmbt_fork(sc, dip, afork_size,
+					XFS_ATTR_FORK))
+			return true;
+		break;
+	default:
+		return true;
+	}
+
+	return false;
+}
+
+/*
+ * Reset the attr fork to empty.  Since the attr fork could have contained
+ * ACLs, make the file readable only by root.
+ */
+STATIC void
+xrep_dinode_zap_afork(
+	struct xrep_inode	*ri,
+	struct xfs_dinode	*dip,
+	uint16_t		mode)
+{
+	struct xfs_scrub	*sc = ri->sc;
+
+	trace_xrep_dinode_zap_afork(sc, dip);
+
+	dip->di_aformat = XFS_DINODE_FMT_EXTENTS;
+	xrep_dinode_set_attr_nextents(dip, 0);
+
+	/*
+	 * If the data fork is in btree format, removing the attr fork entirely
+	 * might cause verifier failures if the next level down in the bmbt
+	 * could now fit in the data fork area.
+	 */
+	if (dip->di_format != XFS_DINODE_FMT_BTREE)
+		dip->di_forkoff = 0;
+	dip->di_mode = cpu_to_be16(mode & ~0777);
+	dip->di_uid = 0;
+	dip->di_gid = 0;
+}
+
+/* Make sure the fork offset is a sensible value. */
+STATIC void
+xrep_dinode_ensure_forkoff(
+	struct xrep_inode	*ri,
+	struct xfs_dinode	*dip,
+	uint16_t		mode)
+{
+	struct xfs_bmdr_block	*bmdr;
+	struct xfs_scrub	*sc = ri->sc;
+	xfs_extnum_t		attr_extents, data_extents;
+	size_t			bmdr_minsz = XFS_BMDR_SPACE_CALC(1);
+	unsigned int		lit_sz = XFS_LITINO(sc->mp);
+	unsigned int		afork_min, dfork_min;
+
+	trace_xrep_dinode_ensure_forkoff(sc, dip);
+
+	/*
+	 * Before calling this function, xrep_dinode_core ensured that both
+	 * forks actually fit inside their respective literal areas.  If this
+	 * was not the case, the fork was reset to FMT_EXTENTS with zero
+	 * records.  If the rmapbt scan found attr or data fork blocks, this
+	 * will be noted in the dinode_stats, and we must leave enough room
+	 * for the bmap repair code to reconstruct the mapping structure.
+	 *
+	 * First, compute the minimum space required for the attr fork.
+	 */
+	switch (dip->di_aformat) {
+	case XFS_DINODE_FMT_LOCAL:
+		/*
+		 * If we still have a shortform xattr structure at all, that
+		 * means the attr fork area was exactly large enough to fit
+		 * the sf structure.
+		 */
+		afork_min = XFS_DFORK_SIZE(dip, sc->mp, XFS_ATTR_FORK);
+		break;
+	case XFS_DINODE_FMT_EXTENTS:
+		attr_extents = xfs_dfork_attr_extents(dip);
+		if (attr_extents) {
+			/*
+			 * We must maintain sufficient space to hold the entire
+			 * extent map array in the data fork.  Note that we
+			 * previously zapped the fork if it had no chance of
+			 * fitting in the inode.
+			 */
+			afork_min = sizeof(struct xfs_bmbt_rec) * attr_extents;
+		} else if (ri->attr_extents > 0) {
+			/*
+			 * The attr fork thinks it has zero extents, but we
+			 * found some xattr extents.  We need to leave enough
+			 * empty space here so that the incore attr fork will
+			 * get created (and hence trigger the attr fork bmap
+			 * repairer).
+			 */
+			afork_min = bmdr_minsz;
+		} else {
+			/* No extents on disk or found in rmapbt. */
+			afork_min = 0;
+		}
+		break;
+	case XFS_DINODE_FMT_BTREE:
+		/* Must have space for btree header and key/pointers. */
+		bmdr = XFS_DFORK_PTR(dip, XFS_ATTR_FORK);
+		afork_min = XFS_BMAP_BROOT_SPACE(sc->mp, bmdr);
+		break;
+	default:
+		/* We should never see any other formats. */
+		afork_min = 0;
+		break;
+	}
+
+	/* Compute the minimum space required for the data fork. */
+	switch (dip->di_format) {
+	case XFS_DINODE_FMT_DEV:
+		dfork_min = sizeof(__be32);
+		break;
+	case XFS_DINODE_FMT_UUID:
+		dfork_min = sizeof(uuid_t);
+		break;
+	case XFS_DINODE_FMT_LOCAL:
+		/*
+		 * If we still have a shortform data fork at all, that means
+		 * the data fork area was large enough to fit whatever was in
+		 * there.
+		 */
+		dfork_min = be64_to_cpu(dip->di_size);
+		break;
+	case XFS_DINODE_FMT_EXTENTS:
+		data_extents = xfs_dfork_data_extents(dip);
+		if (data_extents) {
+			/*
+			 * We must maintain sufficient space to hold the entire
+			 * extent map array in the data fork.  Note that we
+			 * previously zapped the fork if it had no chance of
+			 * fitting in the inode.
+			 */
+			dfork_min = sizeof(struct xfs_bmbt_rec) * data_extents;
+		} else if (ri->data_extents > 0 || ri->rt_extents > 0) {
+			/*
+			 * The data fork thinks it has zero extents, but we
+			 * found some data extents.  We need to leave enough
+			 * empty space here so that the the data fork bmap
+			 * repair will recover the mappings.
+			 */
+			dfork_min = bmdr_minsz;
+		} else {
+			/* No extents on disk or found in rmapbt. */
+			dfork_min = 0;
+		}
+		break;
+	case XFS_DINODE_FMT_BTREE:
+		/* Must have space for btree header and key/pointers. */
+		bmdr = XFS_DFORK_PTR(dip, XFS_DATA_FORK);
+		dfork_min = XFS_BMAP_BROOT_SPACE(sc->mp, bmdr);
+		break;
+	default:
+		dfork_min = 0;
+		break;
+	}
+
+	/*
+	 * Round all values up to the nearest 8 bytes, because that is the
+	 * precision of di_forkoff.
+	 */
+	afork_min = roundup(afork_min, 8);
+	dfork_min = roundup(dfork_min, 8);
+	bmdr_minsz = roundup(bmdr_minsz, 8);
+
+	ASSERT(dfork_min <= lit_sz);
+	ASSERT(afork_min <= lit_sz);
+
+	/*
+	 * If the data fork was zapped and we don't have enough space for the
+	 * recovery fork, move the attr fork up.
+	 */
+	if (dip->di_format == XFS_DINODE_FMT_EXTENTS &&
+	    xfs_dfork_data_extents(dip) == 0 &&
+	    (ri->data_extents > 0 || ri->rt_extents > 0) &&
+	    bmdr_minsz > XFS_DFORK_DSIZE(dip, sc->mp)) {
+		if (bmdr_minsz + afork_min > lit_sz) {
+			/*
+			 * The attr for and the stub fork we need to recover
+			 * the data fork won't both fit.  Zap the attr fork.
+			 */
+			xrep_dinode_zap_afork(ri, dip, mode);
+			afork_min = bmdr_minsz;
+		} else {
+			void	*before, *after;
+
+			/* Otherwise, just slide the attr fork up. */
+			before = XFS_DFORK_APTR(dip);
+			dip->di_forkoff = bmdr_minsz >> 3;
+			after = XFS_DFORK_APTR(dip);
+			memmove(after, before, XFS_DFORK_ASIZE(dip, sc->mp));
+		}
+	}
+
+	/*
+	 * If the attr fork was zapped and we don't have enough space for the
+	 * recovery fork, move the attr fork down.
+	 */
+	if (dip->di_aformat == XFS_DINODE_FMT_EXTENTS &&
+	    xfs_dfork_attr_extents(dip) == 0 &&
+	    ri->attr_extents > 0 &&
+	    bmdr_minsz > XFS_DFORK_ASIZE(dip, sc->mp)) {
+		if (dip->di_format == XFS_DINODE_FMT_BTREE) {
+			/*
+			 * If the data fork is in btree format then we can't
+			 * adjust forkoff because that runs the risk of
+			 * violating the extents/btree format transition rules.
+			 */
+		} else if (bmdr_minsz + dfork_min > lit_sz) {
+			/*
+			 * If we can't move the attr fork, too bad, we lose the
+			 * attr fork and leak its blocks.
+			 */
+			xrep_dinode_zap_afork(ri, dip, mode);
+		} else {
+			/*
+			 * Otherwise, just slide the attr fork down.  The attr
+			 * fork is empty, so we don't have any old contents to
+			 * move here.
+			 */
+			dip->di_forkoff = (lit_sz - bmdr_minsz) >> 3;
+		}
+	}
+}
+
+/*
+ * Zap the data/attr forks if we spot anything that isn't going to pass the
+ * ifork verifiers or the ifork formatters, because we need to get the inode
+ * into good enough shape that the higher level repair functions can run.
+ */
+STATIC void
+xrep_dinode_zap_forks(
+	struct xrep_inode	*ri,
+	struct xfs_dinode	*dip)
+{
+	struct xfs_scrub	*sc = ri->sc;
+	xfs_extnum_t		data_extents;
+	xfs_extnum_t		attr_extents;
+	xfs_filblks_t		nblocks;
+	uint16_t		mode;
+	bool			zap_datafork = false;
+	bool			zap_attrfork = false;
+
+	trace_xrep_dinode_zap_forks(sc, dip);
+
+	mode = be16_to_cpu(dip->di_mode);
+
+	data_extents = xfs_dfork_data_extents(dip);
+	attr_extents = xfs_dfork_attr_extents(dip);
+	nblocks = be64_to_cpu(dip->di_nblocks);
+
+	/* Inode counters don't make sense? */
+	if (data_extents > nblocks)
+		zap_datafork = true;
+	if (attr_extents > nblocks)
+		zap_attrfork = true;
+	if (data_extents + attr_extents > nblocks)
+		zap_datafork = zap_attrfork = true;
+
+	if (!zap_datafork)
+		zap_datafork = xrep_dinode_check_dfork(sc, dip, mode);
+	if (!zap_attrfork)
+		zap_attrfork = xrep_dinode_check_afork(sc, dip);
+
+	/* Zap whatever's bad. */
+	if (zap_attrfork)
+		xrep_dinode_zap_afork(ri, dip, mode);
+	if (zap_datafork)
+		xrep_dinode_zap_dfork(ri, dip, mode);
+	xrep_dinode_ensure_forkoff(ri, dip, mode);
+	dip->di_nblocks = 0;
+	if (!zap_attrfork)
+		be64_add_cpu(&dip->di_nblocks, ri->attr_blocks);
+	if (!zap_datafork) {
+		be64_add_cpu(&dip->di_nblocks, ri->data_blocks);
+		be64_add_cpu(&dip->di_nblocks, ri->rt_blocks);
+	}
+}
+
 /* Inode didn't pass verifiers, so fix the raw buffer and retry iget. */
 STATIC int
 xrep_dinode_core(
@@ -365,6 +1043,11 @@ xrep_dinode_core(
 	bool			dontcare;
 	int			error;
 
+	/* Figure out what this inode had mapped in both forks. */
+	error = xrep_dinode_count_rmaps(ri);
+	if (error)
+		return error;
+
 	/* Read the inode cluster buffer. */
 	error = xfs_trans_read_buf(sc->mp, sc->tp, sc->mp->m_ddev_targp,
 			ri->imap.im_blkno, ri->imap.im_len, XBF_UNMAPPED, &bp,
@@ -390,9 +1073,10 @@ xrep_dinode_core(
 	dip = xfs_buf_offset(bp, ri->imap.im_boffset);
 	xrep_dinode_header(sc, dip);
 	xrep_dinode_mode(sc, dip);
-	xrep_dinode_flags(sc, dip);
+	xrep_dinode_flags(sc, dip, ri->rt_extents > 0);
 	xrep_dinode_size(sc, dip);
 	xrep_dinode_extsize_hints(sc, dip);
+	xrep_dinode_zap_forks(ri, dip);
 
 	/* Write out the inode. */
 	trace_xrep_dinode_fixed(sc, dip);
diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h
index fffbdf436648..cc939bf726e3 100644
--- a/fs/xfs/scrub/trace.h
+++ b/fs/xfs/scrub/trace.h
@@ -1422,6 +1422,10 @@ DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_extsize_hints);
 DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_zap_symlink);
 DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_zap_dir);
 DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_fixed);
+DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_zap_forks);
+DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_zap_dfork);
+DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_zap_afork);
+DEFINE_REPAIR_DINODE_EVENT(xrep_dinode_ensure_forkoff);
 
 DECLARE_EVENT_CLASS(xrep_inode_class,
 	TP_PROTO(struct xfs_scrub *sc),
@@ -1475,6 +1479,44 @@ DEFINE_REPAIR_INODE_EVENT(xrep_inode_sfdir_size);
 DEFINE_REPAIR_INODE_EVENT(xrep_inode_size);
 DEFINE_REPAIR_INODE_EVENT(xrep_inode_fixed);
 
+TRACE_EVENT(xrep_dinode_count_rmaps,
+	TP_PROTO(struct xfs_scrub *sc, xfs_rfsblock_t data_blocks,
+		xfs_rfsblock_t rt_blocks, xfs_rfsblock_t attr_blocks,
+		xfs_extnum_t data_extents, xfs_extnum_t rt_extents,
+		xfs_aextnum_t attr_extents),
+	TP_ARGS(sc, data_blocks, rt_blocks, attr_blocks, data_extents,
+		rt_extents, attr_extents),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(xfs_ino_t, ino)
+		__field(xfs_rfsblock_t, data_blocks)
+		__field(xfs_rfsblock_t, rt_blocks)
+		__field(xfs_rfsblock_t, attr_blocks)
+		__field(xfs_extnum_t, data_extents)
+		__field(xfs_extnum_t, rt_extents)
+		__field(xfs_aextnum_t, attr_extents)
+	),
+	TP_fast_assign(
+		__entry->dev = sc->mp->m_super->s_dev;
+		__entry->ino = sc->sm->sm_ino;
+		__entry->data_blocks = data_blocks;
+		__entry->rt_blocks = rt_blocks;
+		__entry->attr_blocks = attr_blocks;
+		__entry->data_extents = data_extents;
+		__entry->rt_extents = rt_extents;
+		__entry->attr_extents = attr_extents;
+	),
+	TP_printk("dev %d:%d ino 0x%llx dblocks 0x%llx rtblocks 0x%llx ablocks 0x%llx dextents %llu rtextents %llu aextents %u",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->ino,
+		  __entry->data_blocks,
+		  __entry->rt_blocks,
+		  __entry->attr_blocks,
+		  __entry->data_extents,
+		  __entry->rt_extents,
+		  __entry->attr_extents)
+);
+
 #endif /* IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR) */
 
 #endif /* _TRACE_XFS_SCRUB_TRACE_H */


  parent reply	other threads:[~2023-05-26  0:53 UTC|newest]

Thread overview: 384+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  0:00 [MEGAPATCHSET v25 1/2] xfs: online repair, part 1 Darrick J. Wong
2023-05-26  0:28 ` [PATCHSET 0/7] xfs: fix ranged queries and integer overflows in GETFSMAP Darrick J. Wong
2023-05-26  0:41   ` [PATCH 1/7] xfs: fix interval filtering in multi-step fsmap queries Darrick J. Wong
2023-05-26  0:41   ` [PATCH 2/7] xfs: fix integer overflows in the fsmap rtbitmap and logdev backends Darrick J. Wong
2023-05-26  0:41   ` [PATCH 3/7] xfs: fix getfsmap reporting past the last rt extent Darrick J. Wong
2023-05-26  0:42   ` [PATCH 4/7] xfs: clean up the rtbitmap fsmap backend Darrick J. Wong
2023-05-26  0:42   ` [PATCH 5/7] xfs: fix logdev fsmap query result filtering Darrick J. Wong
2023-05-26  0:42   ` [PATCH 6/7] xfs: validate fsmap offsets specified in the query keys Darrick J. Wong
2023-05-26  0:42   ` [PATCH 7/7] xfs: fix xfs_btree_query_range callers to initialize btree rec fully Darrick J. Wong
2023-06-04 17:56   ` [PATCHSET 0/7] xfs: fix ranged queries and integer overflows in GETFSMAP Darrick J. Wong
2023-06-04 23:02     ` Dave Chinner
2023-06-20  2:09   ` Dave Chinner
2023-06-30  0:00     ` Darrick J. Wong
2023-05-26  0:28 ` [PATCHSET v25.0 0/9] xfs: fix online repair block reaping Darrick J. Wong
2023-05-26  0:43   ` [PATCH 1/9] xfs: cull repair code that will never get used Darrick J. Wong
2023-05-26  0:43   ` [PATCH 2/9] xfs: move the post-repair block reaping code to a separate file Darrick J. Wong
2023-05-26  0:43   ` [PATCH 3/9] xfs: only invalidate blocks if we're going to free them Darrick J. Wong
2023-05-26  0:44   ` [PATCH 4/9] xfs: only allow reaping of per-AG blocks in xrep_reap_extents Darrick J. Wong
2023-05-26  0:44   ` [PATCH 5/9] xfs: use deferred frees to reap old btree blocks Darrick J. Wong
2023-06-20  3:08     ` Dave Chinner
2023-06-20  4:27       ` Darrick J. Wong
2023-05-26  0:44   ` [PATCH 6/9] xfs: rearrange xrep_reap_block to make future code flow easier Darrick J. Wong
2023-05-26  0:44   ` [PATCH 7/9] xfs: ignore stale buffers when scanning the buffer cache Darrick J. Wong
2023-06-20  3:24     ` Dave Chinner
2023-06-20  4:44       ` Darrick J. Wong
2023-06-20  6:01         ` Dave Chinner
2023-07-05 23:17           ` Darrick J. Wong
2023-07-09 23:15             ` Dave Chinner
2023-07-09 23:32               ` Darrick J. Wong
2023-07-10 22:07                 ` Dave Chinner
2023-05-26  0:45   ` [PATCH 8/9] xfs: reap large AG metadata extents when possible Darrick J. Wong
2023-06-20  5:47     ` Dave Chinner
2023-07-07 21:50       ` Darrick J. Wong
2023-05-26  0:45   ` [PATCH 9/9] xfs: use per-AG bitmaps to reap unused AG metadata blocks during repair Darrick J. Wong
2023-05-26  0:28 ` [PATCHSET v25.0 0/6] xfs: prepare repair for bulk loading Darrick J. Wong
2023-05-26  0:45   ` [PATCH 1/6] xfs: force all buffers to be written during btree bulk load Darrick J. Wong
2023-06-21  2:05     ` Dave Chinner
2023-07-05 23:37       ` Darrick J. Wong
2023-05-26  0:45   ` [PATCH 2/6] xfs: implement block reservation accounting for btrees we're staging Darrick J. Wong
2023-05-26  0:46   ` [PATCH 3/6] xfs: log EFIs for all btree blocks being used to stage a btree Darrick J. Wong
2023-05-26  0:46   ` [PATCH 4/6] xfs: add debug knobs to control btree bulk load slack factors Darrick J. Wong
2023-05-26  0:46   ` [PATCH 5/6] xfs: move btree bulkload record initialization to ->get_record implementations Darrick J. Wong
2023-05-26  0:46   ` [PATCH 6/6] xfs: constrain dirty buffers while formatting a staged btree Darrick J. Wong
2023-05-26  0:28 ` [PATCHSET v25.0 0/7] xfs: stage repair information in pageable memory Darrick J. Wong
2023-05-26  0:47   ` [PATCH 1/7] xfs: create a big array data structure Darrick J. Wong
2023-05-26  1:34     ` Kent Overstreet
2023-05-26  3:19       ` Darrick J. Wong
2023-06-22  2:55     ` Dave Chinner
2023-07-05 23:48       ` Darrick J. Wong
2023-05-26  0:47   ` [PATCH 2/7] xfs: enable sorting of xfile-backed arrays Darrick J. Wong
2023-05-26  0:47   ` [PATCH 3/7] xfs: convert xfarray insertion sort to heapsort using scratchpad memory Darrick J. Wong
2023-05-26  0:47   ` [PATCH 4/7] xfs: teach xfile to pass back direct-map pages to caller Darrick J. Wong
2023-05-26  0:48   ` [PATCH 5/7] xfs: speed up xfarray sort by sorting xfile page contents directly Darrick J. Wong
2023-05-26  0:48   ` [PATCH 6/7] xfs: cache pages used for xfarray quicksort convergence Darrick J. Wong
2023-05-26  0:48   ` [PATCH 7/7] xfs: improve xfarray quicksort pivot Darrick J. Wong
2023-06-22  2:58   ` [PATCHSET v25.0 0/7] xfs: stage repair information in pageable memory Dave Chinner
2023-05-26  0:29 ` [PATCHSET v25.0 0/4] xfs: online scrubbing of realtime summary files Darrick J. Wong
2023-05-26  0:48   ` [PATCH 1/4] xfs: get our own reference to inodes that we want to scrub Darrick J. Wong
2023-05-26  0:49   ` [PATCH 2/4] xfs: wrap ilock/iunlock operations on sc->ip Darrick J. Wong
2023-05-26  0:49   ` [PATCH 3/4] xfs: move the realtime summary file scrubber to a separate source file Darrick J. Wong
2023-05-26  0:49   ` [PATCH 4/4] xfs: implement online scrubbing of rtsummary info Darrick J. Wong
2023-06-22  3:11   ` [PATCHSET v25.0 0/4] xfs: online scrubbing of realtime summary files Dave Chinner
2023-05-26  0:29 ` [PATCHSET v25.0 0/2] xfs: miscellaneous repair tweaks Darrick J. Wong
2023-05-26  0:50   ` [PATCH 1/2] xfs: always rescan allegedly healthy per-ag metadata after repair Darrick J. Wong
2023-05-26  0:50   ` [PATCH 2/2] xfs: allow the user to cancel repairs before we start writing Darrick J. Wong
2023-06-22  3:13   ` [PATCHSET v25.0 0/2] xfs: miscellaneous repair tweaks Dave Chinner
2023-05-26  0:29 ` [PATCHSET v25.0 0/2] xfs: force rebuilding of metadata Darrick J. Wong
2023-05-26  0:50   ` [PATCH 1/2] xfs: don't complain about unfixed metadata when repairs were injected Darrick J. Wong
2023-05-26  0:50   ` [PATCH 2/2] xfs: allow userspace to rebuild metadata structures Darrick J. Wong
2023-06-22  3:17     ` Dave Chinner
2023-07-05 23:52       ` Darrick J. Wong
2023-06-22  3:18   ` [PATCHSET v25.0 0/2] xfs: force rebuilding of metadata Dave Chinner
2023-05-26  0:29 ` [PATCHSET v25.0 0/5] xfs: online repair of AG btrees Darrick J. Wong
2023-05-26  0:51   ` [PATCH 1/5] xfs: clear pagf_agflreset when repairing the AGFL Darrick J. Wong
2023-05-26  0:51   ` [PATCH 2/5] xfs: repair free space btrees Darrick J. Wong
2023-05-26  0:51   ` [PATCH 3/5] xfs: rewrite xfs_icache_inode_is_allocated Darrick J. Wong
2023-06-22  4:04     ` Dave Chinner
2023-07-06  0:37       ` Darrick J. Wong
2023-07-09 23:05         ` Dave Chinner
2023-07-09 23:23           ` Darrick J. Wong
2023-05-26  0:51   ` [PATCH 4/5] xfs: repair inode btrees Darrick J. Wong
2023-05-26  0:52   ` [PATCH 5/5] xfs: repair refcount btrees Darrick J. Wong
2023-06-28  0:08   ` [PATCHSET v25.0 0/5] xfs: online repair of AG btrees Dave Chinner
2023-05-26  0:30 ` [PATCHSET v25.0 0/6] xfs: online repair of inodes and forks Darrick J. Wong
2023-05-26  0:52   ` [PATCH 1/6] xfs: disable online repair quota helpers when quota not enabled Darrick J. Wong
2023-05-26  0:52   ` [PATCH 2/6] xfs: try to attach dquots to files before repairing them Darrick J. Wong
2023-05-26  0:52   ` [PATCH 3/6] xfs: repair inode records Darrick J. Wong
2023-05-26  0:53   ` Darrick J. Wong [this message]
2023-05-26  0:53   ` [PATCH 5/6] xfs: abort directory parent scrub scans if we encounter a zapped directory Darrick J. Wong
2023-05-26  0:53   ` [PATCH 6/6] xfs: repair obviously broken inode modes Darrick J. Wong
2023-05-26  0:30 ` [PATCHSET v25.0 0/5] xfs: online repair of file fork mappings Darrick J. Wong
2023-05-26  0:53   ` [PATCH 1/5] xfs: reintroduce reaping of file metadata blocks to xrep_reap_extents Darrick J. Wong
2023-05-26  0:54   ` [PATCH 2/5] xfs: repair inode fork block mapping data structures Darrick J. Wong
2023-05-26  0:54   ` [PATCH 3/5] xfs: refactor repair forcing tests into a repair.c helper Darrick J. Wong
2023-05-26  0:54   ` [PATCH 4/5] xfs: create a ranged query function for refcount btrees Darrick J. Wong
2023-05-26  0:54   ` [PATCH 5/5] xfs: repair problems in CoW forks Darrick J. Wong
2023-05-26  0:30 ` [PATCHSET v25.0 0/4] xfs: online repair of quota and rt metadata files Darrick J. Wong
2023-05-26  0:55   ` [PATCH 1/4] xfs: repair the inode core and forks of a metadata inode Darrick J. Wong
2023-05-26  0:55   ` [PATCH 2/4] xfs: create a new inode fork block unmap helper Darrick J. Wong
2023-05-26  0:55   ` [PATCH 3/4] xfs: online repair of realtime bitmaps Darrick J. Wong
2023-05-26  0:56   ` [PATCH 4/4] xfs: repair quotas Darrick J. Wong
2023-05-26  0:31 ` [PATCHSET v25.0 0/4] xfs: live inode scans for online fsck Darrick J. Wong
2023-05-26  0:56   ` [PATCH 1/4] xfs: speed up xfs_iwalk_adjust_start a little bit Darrick J. Wong
2023-05-26  0:56   ` [PATCH 2/4] xfs: implement live inode scan for scrub Darrick J. Wong
2023-05-26  0:56   ` [PATCH 3/4] xfs: allow scrub to hook metadata updates in other writers Darrick J. Wong
2023-05-26  0:57   ` [PATCH 4/4] xfs: allow blocking notifier chains with filesystem hooks Darrick J. Wong
2023-05-26  0:31 ` [PATCHSET v25.0 0/7] xfs: online repair of quota counters Darrick J. Wong
2023-05-26  0:57   ` [PATCH 1/7] xfs: stagger the starting AG of scrub iscans to reduce contention Darrick J. Wong
2023-05-26  0:57   ` [PATCH 2/7] xfs: cache a bunch of inodes for repair scans Darrick J. Wong
2023-05-26  0:57   ` [PATCH 3/7] xfs: report the health of quota counts Darrick J. Wong
2023-05-26  0:58   ` [PATCH 4/7] xfs: implement live quotacheck inode scan Darrick J. Wong
2023-05-26  0:58   ` [PATCH 5/7] xfs: track quota updates during live quotacheck Darrick J. Wong
2023-05-26  0:58   ` [PATCH 6/7] xfs: repair cannot update the summary counters when logging quota flags Darrick J. Wong
2023-05-26  0:58   ` [PATCH 7/7] xfs: repair dquots based on live quotacheck results Darrick J. Wong
2023-05-26  0:31 ` [PATCHSET v25.0 0/5] xfs: online repair of file link counts Darrick J. Wong
2023-05-26  0:59   ` [PATCH 1/5] xfs: report health of inode " Darrick J. Wong
2023-05-26  0:59   ` [PATCH 2/5] xfs: teach scrub to check file nlinks Darrick J. Wong
2023-05-26  0:59   ` [PATCH 3/5] xfs: track directory entry updates during live nlinks fsck Darrick J. Wong
2023-05-26  0:59   ` [PATCH 4/5] xfs: create a predicate to determine if two xfs_names are the same Darrick J. Wong
2023-05-26  1:00   ` [PATCH 5/5] xfs: teach repair to fix file nlinks Darrick J. Wong
2023-05-26  0:31 ` [PATCHSET v25.0 00/11] xfs: report corruption to the health trackers Darrick J. Wong
2023-05-26  1:00   ` [PATCH 01/11] xfs: separate the marking of sick and checked metadata Darrick J. Wong
2023-05-26  1:00   ` [PATCH 02/11] xfs: report fs corruption errors to the health tracking system Darrick J. Wong
2023-05-26  1:00   ` [PATCH 03/11] xfs: report ag header " Darrick J. Wong
2023-05-26  1:01   ` [PATCH 04/11] xfs: report block map " Darrick J. Wong
2023-05-26  1:01   ` [PATCH 05/11] xfs: report btree block corruption errors to the health system Darrick J. Wong
2023-05-26  1:01   ` [PATCH 06/11] xfs: report dir/attr " Darrick J. Wong
2023-05-26  1:01   ` [PATCH 07/11] xfs: report symlink " Darrick J. Wong
2023-05-26  1:02   ` [PATCH 08/11] xfs: report inode " Darrick J. Wong
2023-05-26  1:02   ` [PATCH 09/11] xfs: report quota block " Darrick J. Wong
2023-05-26  1:02   ` [PATCH 10/11] xfs: report realtime metadata " Darrick J. Wong
2023-05-26  1:03   ` [PATCH 11/11] xfs: report XFS_IS_CORRUPT " Darrick J. Wong
2023-05-26  0:32 ` [PATCHSET v25.0 0/3] xfs: indirect health reporting Darrick J. Wong
2023-05-26  1:03   ` [PATCH 1/3] xfs: add secondary and indirect classes to the health tracking system Darrick J. Wong
2023-05-26  1:03   ` [PATCH 2/3] xfs: remember sick inodes that get inactivated Darrick J. Wong
2023-05-26  1:03   ` [PATCH 3/3] xfs: update health status if we get a clean bill of health Darrick J. Wong
2023-05-26  0:32 ` [PATCHSET v25.0 0/3] xfs: online repair for fs summary counters Darrick J. Wong
2023-05-26  1:04   ` [PATCH 1/3] fs: distinguish between user initiated freeze and kernel initiated freeze Darrick J. Wong
2023-05-26  1:04   ` [PATCH 2/3] xfs: stabilize fs summary counters for online fsck Darrick J. Wong
2023-05-26  1:04   ` [PATCH 3/3] xfs: repair summary counters Darrick J. Wong
2023-05-26  0:32 ` [PATCHSET v25.0 0/9] xfs: support in-memory btrees Darrick J. Wong
2023-05-26  1:04   ` [PATCH 1/9] xfs: dump xfiles for debugging purposes Darrick J. Wong
2023-05-26  1:05   ` [PATCH 2/9] xfs: teach buftargs to maintain their own buffer hashtable Darrick J. Wong
2023-05-26  1:05   ` [PATCH 3/9] xfs: create buftarg helpers to abstract block_device operations Darrick J. Wong
2023-05-26  1:05   ` [PATCH 4/9] xfs: make GFP_ usage consistent when allocating buftargs Darrick J. Wong
2023-05-26  1:05   ` [PATCH 5/9] xfs: support in-memory buffer cache targets Darrick J. Wong
2023-05-26  1:06   ` [PATCH 6/9] xfs: consolidate btree block freeing tracepoints Darrick J. Wong
2023-05-26  1:06   ` [PATCH 7/9] xfs: consolidate btree block allocation tracepoints Darrick J. Wong
2023-05-26  1:06   ` [PATCH 8/9] xfs: support in-memory btrees Darrick J. Wong
2023-05-26  1:06   ` [PATCH 9/9] xfs: connect in-memory btrees to xfiles Darrick J. Wong
2023-05-26  0:32 ` [PATCHSET v25.0 0/4] xfs: online repair of rmap btrees Darrick J. Wong
2023-05-26  1:07   ` [PATCH 1/4] xfs: create a helper to decide if a file mapping targets the rt volume Darrick J. Wong
2023-05-26  1:07   ` [PATCH 2/4] xfs: repair the rmapbt Darrick J. Wong
2023-05-26  1:07   ` [PATCH 3/4] xfs: create a shadow rmap btree during rmap repair Darrick J. Wong
2023-05-26  1:07   ` [PATCH 4/4] xfs: hook live rmap operations during a repair operation Darrick J. Wong
2023-05-26  0:33 ` [PATCHSET v25.0 0/9] xfs: move btree geometry to ops struct Darrick J. Wong
2023-05-26  1:08   ` [PATCH 1/9] xfs: set the btree cursor bc_ops in xfs_btree_alloc_cursor Darrick J. Wong
2023-05-26  1:08   ` [PATCH 2/9] xfs: encode the default bc_flags in the btree ops structure Darrick J. Wong
2023-05-26  1:08   ` [PATCH 3/9] xfs: export some of the btree ops structures Darrick J. Wong
2023-05-26  1:09   ` [PATCH 4/9] xfs: initialize btree blocks using btree_ops structure Darrick J. Wong
2023-05-26  1:09   ` [PATCH 5/9] xfs: rename btree block/buffer init functions Darrick J. Wong
2023-05-26  1:09   ` [PATCH 6/9] xfs: btree convert xfs_btree_init_block to xfs_btree_init_buf calls Darrick J. Wong
2023-05-26  1:09   ` [PATCH 7/9] xfs: remove the unnecessary daddr paramter to _init_block Darrick J. Wong
2023-05-26  1:10   ` [PATCH 8/9] xfs: set btree block buffer ops in _init_buf Darrick J. Wong
2023-05-26  1:10   ` [PATCH 9/9] xfs: remove unnecessary fields in xfbtree_config Darrick J. Wong
2023-05-26  0:33 ` [PATCHSET v25.0 0/4] xfs: reduce refcount repair memory usage Darrick J. Wong
2023-05-26  1:10   ` [PATCH 1/4] xfs: move lru refs to the btree ops structure Darrick J. Wong
2023-05-26  1:10   ` [PATCH 2/4] xfs: define an in-memory btree for storing refcount bag info during repairs Darrick J. Wong
2023-05-26  1:11   ` [PATCH 3/4] xfs: create refcount bag structure for btree repairs Darrick J. Wong
2023-05-26  1:11   ` [PATCH 4/4] xfs: port refcount repair to the new refcount bag structure Darrick J. Wong
2023-05-26  0:33 ` [PATCHSET v25.0 0/3] xfs: bmap log intent cleanups Darrick J. Wong
2023-05-26  1:11   ` [PATCH 1/3] xfs: split tracepoint classes for deferred items Darrick J. Wong
2023-05-26  1:11   ` [PATCH 2/3] xfs: clean up bmap log intent item tracepoint callsites Darrick J. Wong
2023-05-26  1:12   ` [PATCH 3/3] xfs: remove xfs_trans_set_bmap_flags Darrick J. Wong
2023-05-26  0:33 ` [PATCHSET v25.0 0/4] xfs: widen BUI formats to support realtime Darrick J. Wong
2023-05-26  1:12   ` [PATCH 1/4] xfs: fix xfs_bunmapi to allow unmapping of partial rt extents Darrick J. Wong
2023-05-26  1:12   ` [PATCH 2/4] xfs: hoist freeing of rt data fork extent mappings Darrick J. Wong
2023-05-26  1:12   ` [PATCH 3/4] xfs: add a realtime flag to the bmap update log redo items Darrick J. Wong
2023-05-26  1:13   ` [PATCH 4/4] xfs: support recovering bmap intent items targetting realtime extents Darrick J. Wong
2023-05-26  0:34 ` [PATCHSET v25.0 0/2] xfs: support attrfork and unwritten BUIs Darrick J. Wong
2023-05-26  1:13   ` [PATCH 1/2] xfs: support deferred bmap updates on the attr fork Darrick J. Wong
2023-05-26  1:13   ` [PATCH 2/2] xfs: xfs_bmap_finish_one should map unwritten extents properly Darrick J. Wong
2023-05-26  0:34 ` [PATCHSET v25.0 0/3] xfs: clean up symbolic link code Darrick J. Wong
2023-05-26  1:13   ` [PATCH 1/3] xfs: move xfs_symlink_remote.c declarations to xfs_symlink_remote.h Darrick J. Wong
2023-05-26  1:14   ` [PATCH 2/3] xfs: move remote symlink target read function to libxfs Darrick J. Wong
2023-05-26  1:14   ` [PATCH 3/3] xfs: move symlink target write " Darrick J. Wong
2023-05-26  0:34 ` [PATCHSET v25.0 00/25] xfs: atomic file updates Darrick J. Wong
2023-05-26  1:14   ` [PATCH 01/25] xfs: add a libxfs header file for staging new ioctls Darrick J. Wong
2023-05-26  1:14   ` [PATCH 02/25] xfs: introduce new file range exchange ioctl Darrick J. Wong
2023-05-26  1:15   ` [PATCH 03/25] xfs: move inode lease breaking functions to xfs_inode.c Darrick J. Wong
2023-05-26  1:15   ` [PATCH 04/25] xfs: move xfs_iops.c declarations out of xfs_inode.h Darrick J. Wong
2023-05-26  1:15   ` [PATCH 05/25] xfs: declare xfs_file.c symbols in xfs_file.h Darrick J. Wong
2023-05-26  1:16   ` [PATCH 06/25] xfs: create a new helper to return a file's allocation unit Darrick J. Wong
2023-05-26  1:16   ` [PATCH 07/25] xfs: refactor non-power-of-two alignment checks Darrick J. Wong
2023-05-26  1:16   ` [PATCH 08/25] xfs: parameterize all the incompat log feature helpers Darrick J. Wong
2023-05-26  1:16   ` [PATCH 09/25] xfs: create a log incompat flag for atomic extent swapping Darrick J. Wong
2023-05-26  1:17   ` [PATCH 10/25] xfs: introduce a swap-extent log intent item Darrick J. Wong
2023-05-26  1:17   ` [PATCH 11/25] xfs: create deferred log items for extent swapping Darrick J. Wong
2023-05-26  1:17   ` [PATCH 12/25] xfs: enable xlog users to toggle atomic " Darrick J. Wong
2023-05-26  1:17   ` [PATCH 13/25] xfs: bind the xfs-specific extent swape code to the vfs-generic file exchange code Darrick J. Wong
2023-05-26  1:18   ` [PATCH 14/25] xfs: add error injection to test swapext recovery Darrick J. Wong
2023-05-26  1:18   ` [PATCH 15/25] xfs: port xfs_swap_extents_rmap to our new code Darrick J. Wong
2023-05-26  1:18   ` [PATCH 16/25] xfs: consolidate all of the xfs_swap_extent_forks code Darrick J. Wong
2023-05-26  1:19   ` [PATCH 17/25] xfs: port xfs_swap_extent_forks to use xfs_swapext_req Darrick J. Wong
2023-05-26  1:26   ` [PATCH 18/25] xfs: allow xfs_swap_range to use older extent swap algorithms Darrick J. Wong
2023-05-26  1:26   ` [PATCH 19/25] xfs: remove old swap extents implementation Darrick J. Wong
2023-05-26  1:27   ` [PATCH 20/25] xfs: condense extended attributes after an atomic swap Darrick J. Wong
2023-05-26  1:27   ` [PATCH 21/25] xfs: condense directories " Darrick J. Wong
2023-05-26  1:27   ` [PATCH 22/25] xfs: condense symbolic links " Darrick J. Wong
2023-05-26  1:28   ` [PATCH 23/25] xfs: make atomic extent swapping support realtime files Darrick J. Wong
2023-05-26  1:28   ` [PATCH 24/25] xfs: support non-power-of-two rtextsize with exchange-range Darrick J. Wong
2023-05-26  1:28   ` [PATCH 25/25] xfs: enable atomic swapext feature Darrick J. Wong
2023-05-26  0:34 ` [PATCHSET v25.0 0/4] xfs: create temporary files for online repair Darrick J. Wong
2023-05-26  1:28   ` [PATCH 1/4] xfs: hide private inodes from bulkstat and handle functions Darrick J. Wong
2023-05-26  1:29   ` [PATCH 2/4] xfs: create temporary files and directories for online repair Darrick J. Wong
2023-05-26  1:29   ` [PATCH 3/4] xfs: refactor stale buffer scanning for repairs Darrick J. Wong
2023-05-26  1:29   ` [PATCH 4/4] xfs: add the ability to reap entire inode forks Darrick J. Wong
2023-05-26  0:35 ` [PATCHSET v25.0 0/3] xfs: online repair of realtime summaries Darrick J. Wong
2023-05-26  1:29   ` [PATCH 1/3] xfs: support preallocating and copying content into temporary files Darrick J. Wong
2023-05-26  1:30   ` [PATCH 2/3] xfs: teach the tempfile to support atomic extent swapping Darrick J. Wong
2023-05-26  1:30   ` [PATCH 3/3] xfs: online repair of realtime summaries Darrick J. Wong
2023-05-26  0:35 ` [PATCHSET v25.0 0/9] xfs: set and validate dir/attr block owners Darrick J. Wong
2023-05-26  1:30   ` [PATCH 1/9] xfs: add an explicit owner field to xfs_da_args Darrick J. Wong
2023-05-26  1:30   ` [PATCH 2/9] xfs: use the xfs_da_args owner field to set new dir/attr block owner Darrick J. Wong
2023-05-26  1:31   ` [PATCH 3/9] xfs: validate attr leaf buffer owners Darrick J. Wong
2023-05-26  1:31   ` [PATCH 4/9] xfs: validate attr remote value " Darrick J. Wong
2023-05-26  1:31   ` [PATCH 5/9] xfs: validate dabtree node " Darrick J. Wong
2023-05-26  1:31   ` [PATCH 6/9] xfs: validate directory leaf " Darrick J. Wong
2023-05-26  1:32   ` [PATCH 7/9] xfs: validate explicit directory data " Darrick J. Wong
2023-05-26  1:32   ` [PATCH 8/9] xfs: validate explicit directory block " Darrick J. Wong
2023-05-26  1:32   ` [PATCH 9/9] xfs: validate explicit directory free block owners Darrick J. Wong
2023-05-26  0:35 ` [PATCHSET v25.0 0/5] xfs: online repair of extended attributes Darrick J. Wong
2023-05-26  1:32   ` [PATCH 1/5] xfs: create a blob array data structure Darrick J. Wong
2023-05-26  1:33   ` [PATCH 2/5] xfs: use atomic extent swapping to fix user file fork data Darrick J. Wong
2023-05-26  1:33   ` [PATCH 3/5] xfs: repair extended attributes Darrick J. Wong
2023-05-26  1:33   ` [PATCH 4/5] xfs: scrub should set preen if attr leaf has holes Darrick J. Wong
2023-05-26  1:33   ` [PATCH 5/5] xfs: flag empty xattr leaf blocks for optimization Darrick J. Wong
2023-05-26  0:35 ` [PATCHSET v25.0 0/7] xfs: online repair of directories Darrick J. Wong
2023-05-26  1:34   ` [PATCH 1/7] xfs: use i_prev_unlinked to distinguish inodes that are not on the unlinked list Darrick J. Wong
2023-05-26  1:34   ` [PATCH 2/7] xfs: ensure unlinked list state is consistent with nlink during scrub Darrick J. Wong
2023-05-26  1:34   ` [PATCH 3/7] xfs: update the unlinked list when repairing link counts Darrick J. Wong
2023-05-26  1:35   ` [PATCH 4/7] xfs: online repair of directories Darrick J. Wong
2023-05-26  1:35   ` [PATCH 5/7] xfs: scan the filesystem to repair a directory dotdot entry Darrick J. Wong
2023-05-26  1:35   ` [PATCH 6/7] xfs: online repair of parent pointers Darrick J. Wong
2023-05-26  1:35   ` [PATCH 7/7] xfs: ask the dentry cache if it knows the parent of a directory Darrick J. Wong
2023-05-26  0:36 ` [PATCHSET v25.0 0/3] xfs: move orphan files to lost and found Darrick J. Wong
2023-05-26  1:36   ` [PATCH 1/3] xfs: move orphan files to the orphanage Darrick J. Wong
2023-05-26  1:36   ` [PATCH 2/3] xfs: move files to orphanage instead of letting nlinks drop to zero Darrick J. Wong
2023-05-26  1:36   ` [PATCH 3/3] xfs: ensure dentry consistency when the orphanage adopts a file Darrick J. Wong
2023-05-26  0:36 ` [PATCHSET v25.0 0/1] xfs: online repair of symbolic links Darrick J. Wong
2023-05-26  1:36   ` [PATCH 1/1] " Darrick J. Wong
2023-05-26  0:36 ` [PATCHSET v25.0 0/1] xfs: online repair of parent pointers Darrick J. Wong
2023-05-26  1:37   ` [PATCH 1/1] xfs: create an xattr iteration function for scrub Darrick J. Wong
2023-05-26  0:36 ` [PATCHSET v25.0 0/3] xfs: online fsck of iunlink buckets Darrick J. Wong
2023-05-26  1:37   ` [PATCH 1/3] xfs: check AGI unlinked inode buckets Darrick J. Wong
2023-05-26  1:37   ` [PATCH 2/3] xfs: hoist AGI repair context to a heap object Darrick J. Wong
2023-05-26  1:37   ` [PATCH 3/3] xfs: repair AGI unlinked inode bucket lists Darrick J. Wong
2023-05-26  0:37 ` [PATCHSET v25.0 0/3] xfs: cache xfile pages for better performance Darrick J. Wong
2023-05-26  1:38   ` [PATCH 1/3] xfs: map xfile pages directly into xfs_buf Darrick J. Wong
2023-05-26  1:38   ` [PATCH 2/3] xfs: use b_offset to support direct-mapping pages when blocksize < pagesize Darrick J. Wong
2023-05-26  1:38   ` [PATCH 3/3] xfile: implement write caching Darrick J. Wong
2023-05-26  0:37 ` [PATCHSET v25.0 0/3] xfs: inode-related repair fixes Darrick J. Wong
2023-05-26  1:38   ` [PATCH 1/3] xfs: check unused nlink fields in the ondisk inode Darrick J. Wong
2023-05-26  1:39   ` [PATCH 2/3] xfs: try to avoid allocating from sick inode clusters Darrick J. Wong
2023-05-26  1:39   ` [PATCH 3/3] xfs: pin inodes that would otherwise overflow link count Darrick J. Wong
2023-05-26  0:37 ` [PATCHSET v25.0 0/4] xfs: relax AGF locks during fstrim Darrick J. Wong
2023-05-26  1:39   ` [PATCH 1/4] xfs: hoist data device FITRIM AG iteration to a separate function Darrick J. Wong
2023-05-26  1:39   ` [PATCH 2/4] xfs: separate the xfs_trim_perag looping code Darrick J. Wong
2023-05-26  1:40   ` [PATCH 3/4] xfs: fix severe performance problems when fstrimming a subset of an AG Darrick J. Wong
2023-05-26  1:40   ` [PATCH 4/4] xfs: relax the AGF lock while we're doing a large fstrim Darrick J. Wong
2023-05-26  0:38 ` [PATCHSET v25.0 0/7] xfs_scrub: fixes to the repair code Darrick J. Wong
2023-05-26  1:40   ` [PATCH 1/7] xfs_scrub: flush stdout after printing to it Darrick J. Wong
2023-05-26  1:41   ` [PATCH 2/7] xfs_scrub: don't report media errors for space with unknowable owner Darrick J. Wong
2023-05-26  1:41   ` [PATCH 3/7] xfs_scrub: remove ALP_* flags namespace Darrick J. Wong
2023-05-26  1:41   ` [PATCH 4/7] xfs_scrub: move repair functions to repair.c Darrick J. Wong
2023-05-26  1:41   ` [PATCH 5/7] xfs_scrub: log when a repair was unnecessary Darrick J. Wong
2023-05-26  1:42   ` [PATCH 6/7] xfs_scrub: require primary superblock repairs to complete before proceeding Darrick J. Wong
2023-05-26  1:42   ` [PATCH 7/7] xfs_scrub: actually try to fix summary counters ahead of repairs Darrick J. Wong
2023-06-08 13:22   ` [PATCHSET v25.0 0/7] xfs_scrub: fixes to the repair code Shiyang Ruan
2023-06-08 14:56     ` Darrick J. Wong
2023-06-09  3:22       ` Shiyang Ruan
2023-07-13  5:12         ` Darrick J. Wong
2023-05-26  0:38 ` [PATCHSET v25.0 0/6] xfs_scrub: improve warnings about difficult repairs Darrick J. Wong
2023-05-26  1:42   ` [PATCH 1/6] xfs_scrub: collapse trivial superblock scrub helpers Darrick J. Wong
2023-05-26  1:42   ` [PATCH 2/6] xfs_scrub: get rid of trivial fs metadata scanner helpers Darrick J. Wong
2023-05-26  1:43   ` [PATCH 3/6] xfs_scrub: split up the mustfix repairs and difficulty assessment functions Darrick J. Wong
2023-05-26  1:43   ` [PATCH 4/6] xfs_scrub: add missing repair types to the mustfix and difficulty assessment Darrick J. Wong
2023-05-26  1:43   ` [PATCH 5/6] xfs_scrub: any inconsistency in metadata should trigger difficulty warnings Darrick J. Wong
2023-05-26  1:43   ` [PATCH 6/6] xfs_scrub: warn about difficult repairs to rt and quota metadata Darrick J. Wong
2023-05-26  0:38 ` [PATCHSET v25.0 0/9] xfs_scrub: track data dependencies for repairs Darrick J. Wong
2023-05-26  1:44   ` [PATCH 1/9] xfs_scrub: track repair items by principal, not by individual repairs Darrick J. Wong
2023-05-26  1:44   ` [PATCH 2/9] xfs_scrub: use repair_item to direct repair activities Darrick J. Wong
2023-05-26  1:44   ` [PATCH 3/9] xfs_scrub: remove action lists from phaseX code Darrick J. Wong
2023-05-26  1:44   ` [PATCH 4/9] xfs_scrub: remove scrub_metadata_file Darrick J. Wong
2023-05-26  1:45   ` [PATCH 5/9] xfs_scrub: boost the repair priority of dependencies of damaged items Darrick J. Wong
2023-05-26  1:45   ` [PATCH 6/9] xfs_scrub: clean up repair_item_difficulty a little Darrick J. Wong
2023-05-26  1:45   ` [PATCH 7/9] xfs_scrub: check dependencies of a scrub type before repairing Darrick J. Wong
2023-05-26  1:45   ` [PATCH 8/9] xfs_scrub: retry incomplete repairs Darrick J. Wong
2023-05-26  1:46   ` [PATCH 9/9] xfs_scrub: remove unused action_list fields Darrick J. Wong
2023-05-26  0:38 ` [PATCHSET v25.0 0/5] xfs_scrub: use scrub_item to track check progress Darrick J. Wong
2023-05-26  1:46   ` [PATCH 1/5] xfs_scrub: start tracking scrub state in scrub_item Darrick J. Wong
2023-05-26  1:46   ` [PATCH 2/5] xfs_scrub: remove enum check_outcome Darrick J. Wong
2023-05-26  1:46   ` [PATCH 3/5] xfs_scrub: refactor scrub_meta_type out of existence Darrick J. Wong
2023-05-26  1:47   ` [PATCH 4/5] xfs_scrub: hoist repair retry loop to repair_item_class Darrick J. Wong
2023-05-26  1:47   ` [PATCH 5/5] xfs_scrub: hoist scrub retry loop to scrub_item_check_file Darrick J. Wong
2023-05-26  0:39 ` [PATCHSET v25.0 0/4] xfs_scrub: improve scheduling of repair items Darrick J. Wong
2023-05-26  1:47   ` [PATCH 1/4] libfrog: enhance ptvar to support initializer functions Darrick J. Wong
2023-05-26  1:48   ` [PATCH 2/4] xfs_scrub: improve thread scheduling repair items during phase 4 Darrick J. Wong
2023-05-26  1:48   ` [PATCH 3/4] xfs_scrub: recheck entire metadata objects after corruption repairs Darrick J. Wong
2023-05-26  1:48   ` [PATCH 4/4] xfs_scrub: try to repair space metadata before file metadata Darrick J. Wong
2023-05-26  0:39 ` [PATCHSET v25.0 0/8] xfs_scrub: move fstrim to a separate phase Darrick J. Wong
2023-05-26  1:48   ` [PATCH 1/8] xfs_scrub: move FITRIM to phase 8 Darrick J. Wong
2023-05-26  1:49   ` [PATCH 2/8] xfs_scrub: ignore phase 8 if the user disabled fstrim Darrick J. Wong
2023-05-26  1:49   ` [PATCH 3/8] xfs_scrub: collapse trim_filesystem Darrick J. Wong
2023-05-26  1:49   ` [PATCH 4/8] xfs_scrub: fix the work estimation for phase 8 Darrick J. Wong
2023-05-26  1:49   ` [PATCH 5/8] xfs_scrub: report FITRIM errors properly Darrick J. Wong
2023-05-26  1:50   ` [PATCH 6/8] xfs_scrub: don't call FITRIM after runtime errors Darrick J. Wong
2023-05-26  1:50   ` [PATCH 7/8] xfs_scrub: don't trim the first agbno of each AG for better performance Darrick J. Wong
2023-05-26  1:50   ` [PATCH 8/8] xfs_scrub: improve progress meter for phase 8 fstrimming Darrick J. Wong
2023-05-26  0:39 ` [PATCHSET v25.0 0/7] xfs_scrub: use free space histograms to reduce fstrim runtime Darrick J. Wong
2023-05-26  1:50   ` [PATCH 1/7] libfrog: hoist free space histogram code Darrick J. Wong
2023-05-26  1:51   ` [PATCH 2/7] libfrog: print wider columns for free space histogram Darrick J. Wong
2023-05-26  1:51   ` [PATCH 3/7] libfrog: print cdf of free space buckets Darrick J. Wong
2023-05-26  1:51   ` [PATCH 4/7] xfs_scrub: don't close stdout when closing the progress bar Darrick J. Wong
2023-05-26  1:51   ` [PATCH 5/7] xfs_scrub: remove pointless spacemap.c arguments Darrick J. Wong
2023-05-26  1:52   ` [PATCH 6/7] xfs_scrub: collect free space histograms during phase 7 Darrick J. Wong
2023-05-26  1:52   ` [PATCH 7/7] xfs_scrub: tune fstrim minlen parameter based on free space histograms Darrick J. Wong
2023-05-26  0:39 ` [PATCHSET v25.0 0/5] xfs_scrub: fixes for systemd services Darrick J. Wong
2023-05-26  1:52   ` [PATCH 1/5] debian: install scrub services with dh_installsystemd Darrick J. Wong
2023-11-07  8:35     ` Christoph Hellwig
2023-05-26  1:52   ` [PATCH 2/5] xfs_scrub_all: escape service names consistently Darrick J. Wong
2023-11-07  8:37     ` Christoph Hellwig
2023-05-26  1:53   ` [PATCH 3/5] xfs_scrub: fix pathname escaping across all service definitions Darrick J. Wong
2023-11-07  8:38     ` Christoph Hellwig
2023-05-26  1:53   ` [PATCH 4/5] xfs_scrub_fail: fix sendmail detection Darrick J. Wong
2023-11-07  8:39     ` Christoph Hellwig
2023-05-26  1:53   ` [PATCH 5/5] xfs_scrub_fail: return the failure status of the mailer program Darrick J. Wong
2023-11-07  8:39     ` Christoph Hellwig
2023-05-26  0:40 ` [PATCHSET v25.0 0/4] xfs_scrub_all: fixes for systemd services Darrick J. Wong
2023-05-26  1:54   ` [PATCH 1/4] xfs_scrub_all: fix argument passing when invoking xfs_scrub manually Darrick J. Wong
2023-11-07  8:39     ` Christoph Hellwig
2023-05-26  1:54   ` [PATCH 2/4] xfs_scrub_all: survive systemd restarts when waiting for services Darrick J. Wong
2023-11-07  8:40     ` Christoph Hellwig
2023-05-26  1:54   ` [PATCH 3/4] xfs_scrub_all: simplify cleanup of run_killable Darrick J. Wong
2023-11-07  8:41     ` Christoph Hellwig
2023-05-26  1:54   ` [PATCH 4/4] xfs_scrub_all: fix termination signal handling Darrick J. Wong
2023-11-07  8:41     ` Christoph Hellwig
2023-05-26  0:40 ` [PATCHSET v25.0 0/5] xfs_scrub: tighten security of systemd services Darrick J. Wong
2023-05-26  1:55   ` [PATCH 1/5] xfs_scrub: allow auxiliary pathnames for sandboxing Darrick J. Wong
2023-11-07  8:48     ` Christoph Hellwig
2023-11-07 18:35       ` Darrick J. Wong
2023-11-08  7:22         ` Christoph Hellwig
2023-11-08  7:24           ` Christoph Hellwig
2023-11-08  7:44           ` Darrick J. Wong
2023-11-08  7:46             ` Darrick J. Wong
2023-11-08  7:49             ` Christoph Hellwig
2023-11-09  0:50               ` Darrick J. Wong
2023-05-26  1:55   ` [PATCH 2/5] xfs_scrub.service: reduce CPU usage to 60% when possible Darrick J. Wong
2023-11-07  8:50     ` Christoph Hellwig
2023-11-07 17:00       ` Darrick J. Wong
2023-05-26  1:55   ` [PATCH 3/5] xfs_scrub: tighten up the security on the background systemd service Darrick J. Wong
2023-11-07  8:52     ` Christoph Hellwig
2023-11-09  0:32       ` Darrick J. Wong
2023-05-26  1:55   ` [PATCH 4/5] xfs_scrub_fail: " Darrick J. Wong
2023-05-26  1:56   ` [PATCH 5/5] xfs_scrub_all: " Darrick J. Wong
2023-05-26  0:40 ` [PATCHSET v25.0 0/6] xfs_scrub_all: automatic media scan service Darrick J. Wong
2023-05-26  1:56   ` [PATCH 1/6] xfs_scrub_all: only use the xfs_scrub@ systemd services in service mode Darrick J. Wong
2023-05-26  1:56   ` [PATCH 2/6] xfs_scrub_all: remove journalctl background process Darrick J. Wong
2023-05-26  1:56   ` [PATCH 3/6] xfs_scrub_all: support metadata+media scans of all filesystems Darrick J. Wong
2023-05-26  1:57   ` [PATCH 4/6] xfs_scrub_all: enable periodic file data scrubs automatically Darrick J. Wong
2023-05-26  1:57   ` [PATCH 5/6] xfs_scrub_all: trigger automatic media scans once per month Darrick J. Wong
2023-05-26  1:57   ` [PATCH 6/6] xfs_scrub_all: failure reporting for the xfs_scrub_all job Darrick J. Wong
2023-05-26  0:40 ` [PATCHSET v25.0 0/5] xfs_scrub_all: improve systemd handling Darrick J. Wong
2023-05-26  1:57   ` [PATCH 1/5] xfs_scrub_all: encapsulate all the subprocess code in an object Darrick J. Wong
2023-05-26  1:58   ` [PATCH 2/5] xfs_scrub_all: encapsulate all the systemctl " Darrick J. Wong
2023-05-26  1:58   ` [PATCH 3/5] xfs_scrub_all: add CLI option for easier debugging Darrick J. Wong
2023-05-26  1:58   ` [PATCH 4/5] xfs_scrub_all: convert systemctl calls to dbus Darrick J. Wong
2023-05-26  1:58   ` [PATCH 5/5] xfs_scrub_all: implement retry and backoff for dbus calls Darrick J. Wong
2023-05-26  0:41 ` [PATCHSET v25.0 0/3] xfs_scrub: automatic optimization by default Darrick J. Wong
2023-05-26  1:59   ` [PATCH 1/3] xfs_scrub: automatic downgrades to dry-run mode in service mode Darrick J. Wong
2023-05-26  1:59   ` [PATCH 2/3] xfs_scrub: add an optimization-only mode Darrick J. Wong
2023-05-26  1:59   ` [PATCH 3/3] debian: enable xfs_scrub systemd services by default Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2023-07-27 22:21 [PATCHSET v26.0 0/6] xfs: online repair of inodes and forks Darrick J. Wong
2023-07-27 22:33 ` [PATCH 4/6] xfs: zap broken inode forks Darrick J. Wong
2022-12-30 22:12 [PATCHSET v24.0 0/6] xfs: online repair of inodes and forks Darrick J. Wong
2022-12-30 22:12 ` [PATCH 4/6] xfs: zap broken inode forks Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=168506058367.3730405.14648957819809852380.stgit@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.