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, willy@infradead.org,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH 9/9] xfs: connect in-memory btrees to xfiles
Date: Thu, 25 May 2023 18:06:55 -0700	[thread overview]
Message-ID: <168506061984.3733082.16963285502416228181.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <168506061839.3733082.9818919714772025609.stgit@frogsfrogsfrogs>

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

Add to our stubbed-out in-memory btrees the ability to connect them with
an actual in-memory backing file (aka xfiles) and the necessary pieces
to track free space in the xfile and flush dirty xfbtree buffers on
demand, which we'll need for online repair.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/libxfs/xfs_btree_mem.h |   41 ++++
 fs/xfs/scrub/bitmap.c         |   28 ++
 fs/xfs/scrub/bitmap.h         |    3 
 fs/xfs/scrub/scrub.c          |    5 
 fs/xfs/scrub/scrub.h          |    3 
 fs/xfs/scrub/trace.c          |   12 +
 fs/xfs/scrub/trace.h          |  110 ++++++++++
 fs/xfs/scrub/xfbtree.c        |  466 +++++++++++++++++++++++++++++++++++++++++
 fs/xfs/scrub/xfbtree.h        |   25 ++
 fs/xfs/scrub/xfile.c          |   83 +++++++
 fs/xfs/scrub/xfile.h          |    2 
 fs/xfs/xfs_trace.h            |    1 
 fs/xfs/xfs_trans.h            |    1 
 fs/xfs/xfs_trans_buf.c        |   42 ++++
 14 files changed, 820 insertions(+), 2 deletions(-)


diff --git a/fs/xfs/libxfs/xfs_btree_mem.h b/fs/xfs/libxfs/xfs_btree_mem.h
index 5e3d58175596..c82d3e6d220a 100644
--- a/fs/xfs/libxfs/xfs_btree_mem.h
+++ b/fs/xfs/libxfs/xfs_btree_mem.h
@@ -8,6 +8,26 @@
 
 struct xfbtree;
 
+struct xfbtree_config {
+	/* Buffer ops for the btree root block */
+	const struct xfs_btree_ops	*btree_ops;
+
+	/* Buffer target for the xfile backing this btree. */
+	struct xfs_buftarg		*target;
+
+	/* Owner of this btree. */
+	unsigned long long		owner;
+
+	/* Btree type number */
+	xfs_btnum_t			btnum;
+
+	/* XFBTREE_CREATE_* flags */
+	unsigned int			flags;
+};
+
+/* btree has long pointers */
+#define XFBTREE_CREATE_LONG_PTRS	(1U << 0)
+
 #ifdef CONFIG_XFS_BTREE_IN_XFILE
 unsigned int xfs_btree_mem_head_nlevels(struct xfs_buf *head_bp);
 
@@ -35,6 +55,16 @@ xfs_failaddr_t xfbtree_lblock_verify(struct xfs_buf *bp, unsigned int max_recs);
 xfs_failaddr_t xfbtree_sblock_verify(struct xfs_buf *bp, unsigned int max_recs);
 unsigned long long xfbtree_buf_to_xfoff(struct xfs_btree_cur *cur,
 		struct xfs_buf *bp);
+
+int xfbtree_get_minrecs(struct xfs_btree_cur *cur, int level);
+int xfbtree_get_maxrecs(struct xfs_btree_cur *cur, int level);
+
+int xfbtree_create(struct xfs_mount *mp, const struct xfbtree_config *cfg,
+		struct xfbtree **xfbtreep);
+int xfbtree_alloc_block(struct xfs_btree_cur *cur,
+		const union xfs_btree_ptr *start, union xfs_btree_ptr *ptr,
+		int *stat);
+int xfbtree_free_block(struct xfs_btree_cur *cur, struct xfs_buf *bp);
 #else
 static inline unsigned int xfs_btree_mem_head_nlevels(struct xfs_buf *head_bp)
 {
@@ -77,11 +107,22 @@ static inline unsigned int xfbtree_bbsize(void)
 #define xfbtree_set_root			NULL
 #define xfbtree_init_ptr_from_cur		NULL
 #define xfbtree_dup_cursor			NULL
+#define xfbtree_get_minrecs			NULL
+#define xfbtree_get_maxrecs			NULL
+#define xfbtree_alloc_block			NULL
+#define xfbtree_free_block			NULL
 #define xfbtree_verify_xfileoff(cur, xfoff)	(false)
 #define xfbtree_check_block_owner(cur, block)	NULL
 #define xfbtree_owner(cur)			(0ULL)
 #define xfbtree_buf_to_xfoff(cur, bp)		(-1)
 
+static inline int
+xfbtree_create(struct xfs_mount *mp, const struct xfbtree_config *cfg,
+		struct xfbtree **xfbtreep)
+{
+	return -EOPNOTSUPP;
+}
+
 #endif /* CONFIG_XFS_BTREE_IN_XFILE */
 
 #endif /* __XFS_BTREE_MEM_H__ */
diff --git a/fs/xfs/scrub/bitmap.c b/fs/xfs/scrub/bitmap.c
index e0c89a9a0ca0..d74f706ff33c 100644
--- a/fs/xfs/scrub/bitmap.c
+++ b/fs/xfs/scrub/bitmap.c
@@ -379,3 +379,31 @@ xbitmap_test(
 	*len = bn->bn_start - start;
 	return false;
 }
+
+/*
+ * Find the first set bit in this bitmap, clear it, and return the index of
+ * that bit in @valp.  Returns -ENODATA if no bits were set, or the usual
+ * negative errno.
+ */
+int
+xbitmap_take_first_set(
+	struct xbitmap		*bitmap,
+	uint64_t		start,
+	uint64_t		last,
+	uint64_t		*valp)
+{
+	struct xbitmap_node	*bn;
+	uint64_t		val;
+	int			error;
+
+	bn = xbitmap_tree_iter_first(&bitmap->xb_root, start, last);
+	if (!bn)
+		return -ENODATA;
+
+	val = bn->bn_start;
+	error = xbitmap_clear(bitmap, bn->bn_start, 1);
+	if (error)
+		return error;
+	*valp = val;
+	return 0;
+}
diff --git a/fs/xfs/scrub/bitmap.h b/fs/xfs/scrub/bitmap.h
index 2518e642f4d3..8159a3c4173d 100644
--- a/fs/xfs/scrub/bitmap.h
+++ b/fs/xfs/scrub/bitmap.h
@@ -32,6 +32,9 @@ int xbitmap_walk(struct xbitmap *bitmap, xbitmap_walk_fn fn,
 bool xbitmap_empty(struct xbitmap *bitmap);
 bool xbitmap_test(struct xbitmap *bitmap, uint64_t start, uint64_t *len);
 
+int xbitmap_take_first_set(struct xbitmap *bitmap, uint64_t start,
+		uint64_t last, uint64_t *valp);
+
 /* Bitmaps, but for type-checked for xfs_agblock_t */
 
 struct xagb_bitmap {
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c
index cf8e78c16670..e57c8e7ad48a 100644
--- a/fs/xfs/scrub/scrub.c
+++ b/fs/xfs/scrub/scrub.c
@@ -17,6 +17,7 @@
 #include "xfs_scrub.h"
 #include "xfs_btree.h"
 #include "xfs_btree_staging.h"
+#include "xfs_buf_xfile.h"
 #include "scrub/scrub.h"
 #include "scrub/common.h"
 #include "scrub/trace.h"
@@ -191,6 +192,10 @@ xchk_teardown(
 		sc->flags &= ~XCHK_HAVE_FREEZE_PROT;
 		mnt_drop_write_file(sc->file);
 	}
+	if (sc->xfile_buftarg) {
+		xfile_free_buftarg(sc->xfile_buftarg);
+		sc->xfile_buftarg = NULL;
+	}
 	if (sc->xfile) {
 		xfile_destroy(sc->xfile);
 		sc->xfile = NULL;
diff --git a/fs/xfs/scrub/scrub.h b/fs/xfs/scrub/scrub.h
index a41ba8d319b6..2f8da220c9e7 100644
--- a/fs/xfs/scrub/scrub.h
+++ b/fs/xfs/scrub/scrub.h
@@ -99,6 +99,9 @@ struct xfs_scrub {
 	/* xfile used by the scrubbers; freed at teardown. */
 	struct xfile			*xfile;
 
+	/* buffer target for the xfile; also freed at teardown. */
+	struct xfs_buftarg		*xfile_buftarg;
+
 	/* Lock flags for @ip. */
 	uint				ilock_flags;
 
diff --git a/fs/xfs/scrub/trace.c b/fs/xfs/scrub/trace.c
index 1fe5c5a9a1ba..d3164c59b0ba 100644
--- a/fs/xfs/scrub/trace.c
+++ b/fs/xfs/scrub/trace.c
@@ -12,15 +12,18 @@
 #include "xfs_mount.h"
 #include "xfs_inode.h"
 #include "xfs_btree.h"
+#include "xfs_btree_mem.h"
 #include "xfs_ag.h"
 #include "xfs_quota_defs.h"
 #include "xfs_dir2.h"
+#include "xfs_da_format.h"
 #include "scrub/scrub.h"
 #include "scrub/xfile.h"
 #include "scrub/xfarray.h"
 #include "scrub/iscan.h"
 #include "scrub/nlinks.h"
 #include "scrub/fscounters.h"
+#include "scrub/xfbtree.h"
 
 /* Figure out which block the btree cursor was pointing to. */
 static inline xfs_fsblock_t
@@ -39,6 +42,15 @@ xchk_btree_cur_fsbno(
 	return NULLFSBLOCK;
 }
 
+#ifdef CONFIG_XFS_BTREE_IN_XFILE
+static inline unsigned long
+xfbtree_ino(
+	struct xfbtree		*xfbt)
+{
+	return file_inode(xfbt->target->bt_xfile->file)->i_ino;
+}
+#endif /* CONFIG_XFS_BTREE_IN_XFILE */
+
 /*
  * We include this last to have the helpers above available for the trace
  * event implementations.
diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h
index 4aefa0533a12..edc86a06da21 100644
--- a/fs/xfs/scrub/trace.h
+++ b/fs/xfs/scrub/trace.h
@@ -24,6 +24,8 @@ struct xfarray_sortinfo;
 struct xchk_iscan;
 struct xchk_nlink;
 struct xchk_fscounters;
+struct xfbtree;
+struct xfbtree_config;
 
 /*
  * ftrace's __print_symbolic requires that all enum values be wrapped in the
@@ -866,6 +868,8 @@ DEFINE_XFILE_EVENT(xfile_pwrite);
 DEFINE_XFILE_EVENT(xfile_seek_data);
 DEFINE_XFILE_EVENT(xfile_get_page);
 DEFINE_XFILE_EVENT(xfile_put_page);
+DEFINE_XFILE_EVENT(xfile_discard);
+DEFINE_XFILE_EVENT(xfile_prealloc);
 
 TRACE_EVENT(xfarray_create,
 	TP_PROTO(struct xfarray *xfa, unsigned long long required_capacity),
@@ -2023,8 +2027,114 @@ DEFINE_XREP_DQUOT_EVENT(xrep_quotacheck_dquot);
 DEFINE_SCRUB_NLINKS_DIFF_EVENT(xrep_nlinks_update_inode);
 DEFINE_SCRUB_NLINKS_DIFF_EVENT(xrep_nlinks_unfixable_inode);
 
+TRACE_EVENT(xfbtree_create,
+	TP_PROTO(struct xfs_mount *mp, const struct xfbtree_config *cfg,
+		 struct xfbtree *xfbt),
+	TP_ARGS(mp, cfg, xfbt),
+	TP_STRUCT__entry(
+		__field(xfs_btnum_t, btnum)
+		__field(unsigned int, xfbtree_flags)
+		__field(unsigned long, xfino)
+		__field(unsigned int, leaf_mxr)
+		__field(unsigned int, leaf_mnr)
+		__field(unsigned int, node_mxr)
+		__field(unsigned int, node_mnr)
+		__field(unsigned long long, owner)
+	),
+	TP_fast_assign(
+		__entry->btnum = cfg->btnum;
+		__entry->xfbtree_flags = cfg->flags;
+		__entry->xfino = xfbtree_ino(xfbt);
+		__entry->leaf_mxr = xfbt->maxrecs[0];
+		__entry->node_mxr = xfbt->maxrecs[1];
+		__entry->leaf_mnr = xfbt->minrecs[0];
+		__entry->node_mnr = xfbt->minrecs[1];
+		__entry->owner = cfg->owner;
+	),
+	TP_printk("xfino 0x%lx btnum %s owner 0x%llx leaf_mxr %u leaf_mnr %u node_mxr %u node_mnr %u",
+		  __entry->xfino,
+		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
+		  __entry->owner,
+		  __entry->leaf_mxr,
+		  __entry->leaf_mnr,
+		  __entry->node_mxr,
+		  __entry->node_mnr)
+);
+
+DECLARE_EVENT_CLASS(xfbtree_buf_class,
+	TP_PROTO(struct xfbtree *xfbt, struct xfs_buf *bp),
+	TP_ARGS(xfbt, bp),
+	TP_STRUCT__entry(
+		__field(unsigned long, xfino)
+		__field(xfs_daddr_t, bno)
+		__field(int, nblks)
+		__field(int, hold)
+		__field(int, pincount)
+		__field(unsigned, lockval)
+		__field(unsigned, flags)
+	),
+	TP_fast_assign(
+		__entry->xfino = xfbtree_ino(xfbt);
+		__entry->bno = xfs_buf_daddr(bp);
+		__entry->nblks = bp->b_length;
+		__entry->hold = atomic_read(&bp->b_hold);
+		__entry->pincount = atomic_read(&bp->b_pin_count);
+		__entry->lockval = bp->b_sema.count;
+		__entry->flags = bp->b_flags;
+	),
+	TP_printk("xfino 0x%lx daddr 0x%llx bbcount 0x%x hold %d pincount %d "
+		  "lock %d flags %s",
+		  __entry->xfino,
+		  (unsigned long long)__entry->bno,
+		  __entry->nblks,
+		  __entry->hold,
+		  __entry->pincount,
+		  __entry->lockval,
+		  __print_flags(__entry->flags, "|", XFS_BUF_FLAGS))
+)
+
+#define DEFINE_XFBTREE_BUF_EVENT(name) \
+DEFINE_EVENT(xfbtree_buf_class, name, \
+	TP_PROTO(struct xfbtree *xfbt, struct xfs_buf *bp), \
+	TP_ARGS(xfbt, bp))
+DEFINE_XFBTREE_BUF_EVENT(xfbtree_create_root_buf);
+DEFINE_XFBTREE_BUF_EVENT(xfbtree_trans_commit_buf);
+DEFINE_XFBTREE_BUF_EVENT(xfbtree_trans_cancel_buf);
+
+DECLARE_EVENT_CLASS(xfbtree_freesp_class,
+	TP_PROTO(struct xfbtree *xfbt, struct xfs_btree_cur *cur,
+		 xfs_fileoff_t fileoff),
+	TP_ARGS(xfbt, cur, fileoff),
+	TP_STRUCT__entry(
+		__field(unsigned long, xfino)
+		__field(xfs_btnum_t, btnum)
+		__field(int, nlevels)
+		__field(xfs_fileoff_t, fileoff)
+	),
+	TP_fast_assign(
+		__entry->xfino = xfbtree_ino(xfbt);
+		__entry->btnum = cur->bc_btnum;
+		__entry->nlevels = cur->bc_nlevels;
+		__entry->fileoff = fileoff;
+	),
+	TP_printk("xfino 0x%lx btree %s nlevels %d fileoff 0x%llx",
+		  __entry->xfino,
+		  __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
+		  __entry->nlevels,
+		  (unsigned long long)__entry->fileoff)
+)
+
+#define DEFINE_XFBTREE_FREESP_EVENT(name) \
+DEFINE_EVENT(xfbtree_freesp_class, name, \
+	TP_PROTO(struct xfbtree *xfbt, struct xfs_btree_cur *cur, \
+		 xfs_fileoff_t fileoff), \
+	TP_ARGS(xfbt, cur, fileoff))
+DEFINE_XFBTREE_FREESP_EVENT(xfbtree_alloc_block);
+DEFINE_XFBTREE_FREESP_EVENT(xfbtree_free_block);
+
 #endif /* IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR) */
 
+
 #endif /* _TRACE_XFS_SCRUB_TRACE_H */
 
 #undef TRACE_INCLUDE_PATH
diff --git a/fs/xfs/scrub/xfbtree.c b/fs/xfs/scrub/xfbtree.c
index 41aed95a1ee7..5cd03457091c 100644
--- a/fs/xfs/scrub/xfbtree.c
+++ b/fs/xfs/scrub/xfbtree.c
@@ -9,14 +9,19 @@
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
+#include "xfs_bit.h"
 #include "xfs_mount.h"
 #include "xfs_trans.h"
+#include "xfs_buf_item.h"
 #include "xfs_btree.h"
 #include "xfs_error.h"
 #include "xfs_btree_mem.h"
 #include "xfs_ag.h"
+#include "scrub/scrub.h"
 #include "scrub/xfile.h"
 #include "scrub/xfbtree.h"
+#include "scrub/bitmap.h"
+#include "scrub/trace.h"
 
 /* btree ops functions for in-memory btrees. */
 
@@ -142,9 +147,18 @@ xfbtree_check_ptr(
 	else
 		bt_xfoff = be32_to_cpu(ptr->s);
 
-	if (!xfbtree_verify_xfileoff(cur, bt_xfoff))
+	if (!xfbtree_verify_xfileoff(cur, bt_xfoff)) {
 		fa = __this_address;
+		goto done;
+	}
 
+	/* Can't point to the head or anything before it */
+	if (bt_xfoff < XFBTREE_INIT_LEAF_BLOCK) {
+		fa = __this_address;
+		goto done;
+	}
+
+done:
 	if (fa) {
 		xfs_err(cur->bc_mp,
 "In-memory: Corrupt btree %d flags 0x%x pointer at level %d index %d fa %pS.",
@@ -350,3 +364,453 @@ xfbtree_sblock_verify(
 
 	return NULL;
 }
+
+/* Close the btree xfile and release all resources. */
+void
+xfbtree_destroy(
+	struct xfbtree		*xfbt)
+{
+	xbitmap_destroy(xfbt->freespace);
+	kfree(xfbt->freespace);
+	xfs_buftarg_drain(xfbt->target);
+	kfree(xfbt);
+}
+
+/* Compute the number of bytes available for records. */
+static inline unsigned int
+xfbtree_rec_bytes(
+	struct xfs_mount		*mp,
+	const struct xfbtree_config	*cfg)
+{
+	unsigned int			blocklen = xfo_to_b(1);
+
+	if (cfg->flags & XFBTREE_CREATE_LONG_PTRS) {
+		if (xfs_has_crc(mp))
+			return blocklen - XFS_BTREE_LBLOCK_CRC_LEN;
+
+		return blocklen - XFS_BTREE_LBLOCK_LEN;
+	}
+
+	if (xfs_has_crc(mp))
+		return blocklen - XFS_BTREE_SBLOCK_CRC_LEN;
+
+	return blocklen - XFS_BTREE_SBLOCK_LEN;
+}
+
+/* Initialize an empty leaf block as the btree root. */
+STATIC int
+xfbtree_init_leaf_block(
+	struct xfs_mount		*mp,
+	struct xfbtree			*xfbt,
+	const struct xfbtree_config	*cfg)
+{
+	struct xfs_buf			*bp;
+	xfs_daddr_t			daddr;
+	int				error;
+	unsigned int			bc_flags = 0;
+
+	if (cfg->flags & XFBTREE_CREATE_LONG_PTRS)
+		bc_flags |= XFS_BTREE_LONG_PTRS;
+
+	daddr = xfo_to_daddr(XFBTREE_INIT_LEAF_BLOCK);
+	error = xfs_buf_get(xfbt->target, daddr, xfbtree_bbsize(), &bp);
+	if (error)
+		return error;
+
+	trace_xfbtree_create_root_buf(xfbt, bp);
+
+	bp->b_ops = cfg->btree_ops->buf_ops;
+	xfs_btree_init_block_int(mp, bp->b_addr, daddr, cfg->btnum, 0, 0,
+			cfg->owner, bc_flags);
+	error = xfs_bwrite(bp);
+	xfs_buf_relse(bp);
+	if (error)
+		return error;
+
+	xfbt->xf_used++;
+	return 0;
+}
+
+/* Initialize the in-memory btree header block. */
+STATIC int
+xfbtree_init_head(
+	struct xfbtree		*xfbt)
+{
+	struct xfs_buf		*bp;
+	xfs_daddr_t		daddr;
+	int			error;
+
+	daddr = xfo_to_daddr(XFBTREE_HEAD_BLOCK);
+	error = xfs_buf_get(xfbt->target, daddr, xfbtree_bbsize(), &bp);
+	if (error)
+		return error;
+
+	xfs_btree_mem_head_init(bp, xfbt->owner, XFBTREE_INIT_LEAF_BLOCK);
+	error = xfs_bwrite(bp);
+	xfs_buf_relse(bp);
+	if (error)
+		return error;
+
+	xfbt->xf_used++;
+	return 0;
+}
+
+/* Create an xfile btree backing thing that can be used for in-memory btrees. */
+int
+xfbtree_create(
+	struct xfs_mount		*mp,
+	const struct xfbtree_config	*cfg,
+	struct xfbtree			**xfbtreep)
+{
+	struct xfbtree			*xfbt;
+	unsigned int			blocklen = xfbtree_rec_bytes(mp, cfg);
+	unsigned int			keyptr_len = cfg->btree_ops->key_len;
+	int				error;
+
+	/* Requires an xfile-backed buftarg. */
+	if (!(cfg->target->bt_flags & XFS_BUFTARG_XFILE)) {
+		ASSERT(cfg->target->bt_flags & XFS_BUFTARG_XFILE);
+		return -EINVAL;
+	}
+
+	xfbt = kzalloc(sizeof(struct xfbtree), XCHK_GFP_FLAGS);
+	if (!xfbt)
+		return -ENOMEM;
+
+	/* Assign our memory file and the free space bitmap. */
+	xfbt->target = cfg->target;
+	xfbt->freespace = kmalloc(sizeof(struct xbitmap), XCHK_GFP_FLAGS);
+	if (!xfbt->freespace) {
+		error = -ENOMEM;
+		goto err_buftarg;
+	}
+	xbitmap_init(xfbt->freespace);
+
+	/* Set up min/maxrecs for this btree. */
+	if (cfg->flags & XFBTREE_CREATE_LONG_PTRS)
+		keyptr_len += sizeof(__be64);
+	else
+		keyptr_len += sizeof(__be32);
+	xfbt->maxrecs[0] = blocklen / cfg->btree_ops->rec_len;
+	xfbt->maxrecs[1] = blocklen / keyptr_len;
+	xfbt->minrecs[0] = xfbt->maxrecs[0] / 2;
+	xfbt->minrecs[1] = xfbt->maxrecs[1] / 2;
+	xfbt->owner = cfg->owner;
+
+	/* Initialize the empty btree. */
+	error = xfbtree_init_leaf_block(mp, xfbt, cfg);
+	if (error)
+		goto err_freesp;
+
+	error = xfbtree_init_head(xfbt);
+	if (error)
+		goto err_freesp;
+
+	trace_xfbtree_create(mp, cfg, xfbt);
+
+	*xfbtreep = xfbt;
+	return 0;
+
+err_freesp:
+	xbitmap_destroy(xfbt->freespace);
+	kfree(xfbt->freespace);
+err_buftarg:
+	xfs_buftarg_drain(xfbt->target);
+	kfree(xfbt);
+	return error;
+}
+
+/* Read the in-memory btree head. */
+int
+xfbtree_head_read_buf(
+	struct xfbtree		*xfbt,
+	struct xfs_trans	*tp,
+	struct xfs_buf		**bpp)
+{
+	struct xfs_buftarg	*btp = xfbt->target;
+	struct xfs_mount	*mp = btp->bt_mount;
+	struct xfs_btree_mem_head *mhead;
+	struct xfs_buf		*bp;
+	xfs_daddr_t		daddr;
+	int			error;
+
+	daddr = xfo_to_daddr(XFBTREE_HEAD_BLOCK);
+	error = xfs_trans_read_buf(mp, tp, btp, daddr, xfbtree_bbsize(), 0,
+			&bp, &xfs_btree_mem_head_buf_ops);
+	if (error)
+		return error;
+
+	mhead = bp->b_addr;
+	if (be64_to_cpu(mhead->mh_owner) != xfbt->owner) {
+		xfs_verifier_error(bp, -EFSCORRUPTED, __this_address);
+		xfs_trans_brelse(tp, bp);
+		return -EFSCORRUPTED;
+	}
+
+	*bpp = bp;
+	return 0;
+}
+
+static inline struct xfile *xfbtree_xfile(struct xfbtree *xfbt)
+{
+	return xfbt->target->bt_xfile;
+}
+
+/* Allocate a block to our in-memory btree. */
+int
+xfbtree_alloc_block(
+	struct xfs_btree_cur		*cur,
+	const union xfs_btree_ptr	*start,
+	union xfs_btree_ptr		*new,
+	int				*stat)
+{
+	struct xfbtree			*xfbt = cur->bc_mem.xfbtree;
+	xfileoff_t			bt_xfoff;
+	loff_t				pos;
+	int				error;
+
+	ASSERT(cur->bc_flags & XFS_BTREE_IN_XFILE);
+
+	/*
+	 * Find the first free block in the free space bitmap and take it.  If
+	 * none are found, seek to end of the file.
+	 */
+	error = xbitmap_take_first_set(xfbt->freespace, 0, -1ULL, &bt_xfoff);
+	if (error == -ENODATA) {
+		bt_xfoff = xfbt->xf_used;
+		xfbt->xf_used++;
+	} else if (error) {
+		return error;
+	}
+
+	trace_xfbtree_alloc_block(xfbt, cur, bt_xfoff);
+
+	/* Fail if the block address exceeds the maximum for short pointers. */
+	if (!(cur->bc_flags & XFS_BTREE_LONG_PTRS) && bt_xfoff >= INT_MAX) {
+		*stat = 0;
+		return 0;
+	}
+
+	/* Make sure we actually can write to the block before we return it. */
+	pos = xfo_to_b(bt_xfoff);
+	error = xfile_prealloc(xfbtree_xfile(xfbt), pos, xfo_to_b(1));
+	if (error)
+		return error;
+
+	if (cur->bc_flags & XFS_BTREE_LONG_PTRS)
+		new->l = cpu_to_be64(bt_xfoff);
+	else
+		new->s = cpu_to_be32(bt_xfoff);
+
+	*stat = 1;
+	return 0;
+}
+
+/* Free a block from our in-memory btree. */
+int
+xfbtree_free_block(
+	struct xfs_btree_cur	*cur,
+	struct xfs_buf		*bp)
+{
+	struct xfbtree		*xfbt = cur->bc_mem.xfbtree;
+	xfileoff_t		bt_xfoff, bt_xflen;
+
+	ASSERT(cur->bc_flags & XFS_BTREE_IN_XFILE);
+
+	bt_xfoff = xfs_daddr_to_xfot(xfs_buf_daddr(bp));
+	bt_xflen = xfs_daddr_to_xfot(bp->b_length);
+
+	trace_xfbtree_free_block(xfbt, cur, bt_xfoff);
+
+	return xbitmap_set(xfbt->freespace, bt_xfoff, bt_xflen);
+}
+
+/* Return the minimum number of records for a btree block. */
+int
+xfbtree_get_minrecs(
+	struct xfs_btree_cur	*cur,
+	int			level)
+{
+	struct xfbtree		*xfbt = cur->bc_mem.xfbtree;
+
+	return xfbt->minrecs[level != 0];
+}
+
+/* Return the maximum number of records for a btree block. */
+int
+xfbtree_get_maxrecs(
+	struct xfs_btree_cur	*cur,
+	int			level)
+{
+	struct xfbtree		*xfbt = cur->bc_mem.xfbtree;
+
+	return xfbt->maxrecs[level != 0];
+}
+
+/* If this log item is a buffer item that came from the xfbtree, return it. */
+static inline struct xfs_buf *
+xfbtree_buf_match(
+	struct xfbtree			*xfbt,
+	const struct xfs_log_item	*lip)
+{
+	const struct xfs_buf_log_item	*bli;
+	struct xfs_buf			*bp;
+
+	if (lip->li_type != XFS_LI_BUF)
+		return NULL;
+
+	bli = container_of(lip, struct xfs_buf_log_item, bli_item);
+	bp = bli->bli_buf;
+	if (bp->b_target != xfbt->target)
+		return NULL;
+
+	return bp;
+}
+
+/*
+ * Detach this (probably dirty) xfbtree buffer from the transaction by any
+ * means necessary.  Returns true if the buffer needs to be written.
+ */
+STATIC bool
+xfbtree_trans_bdetach(
+	struct xfs_trans	*tp,
+	struct xfs_buf		*bp)
+{
+	struct xfs_buf_log_item	*bli = bp->b_log_item;
+	bool			dirty;
+
+	ASSERT(bli != NULL);
+
+	dirty = bli->bli_flags & (XFS_BLI_DIRTY | XFS_BLI_ORDERED);
+
+	bli->bli_flags &= ~(XFS_BLI_DIRTY | XFS_BLI_ORDERED |
+			    XFS_BLI_LOGGED | XFS_BLI_STALE);
+	clear_bit(XFS_LI_DIRTY, &bli->bli_item.li_flags);
+
+	while (bp->b_log_item != NULL)
+		xfs_trans_bdetach(tp, bp);
+
+	return dirty;
+}
+
+/*
+ * Commit changes to the incore btree immediately by writing all dirty xfbtree
+ * buffers to the backing xfile.  This detaches all xfbtree buffers from the
+ * transaction, even on failure.  The buffer locks are dropped between the
+ * delwri queue and submit, so the caller must synchronize btree access.
+ *
+ * Normally we'd let the buffers commit with the transaction and get written to
+ * the xfile via the log, but online repair stages ephemeral btrees in memory
+ * and uses the btree_staging functions to write new btrees to disk atomically.
+ * The in-memory btree (and its backing store) are discarded at the end of the
+ * repair phase, which means that xfbtree buffers cannot commit with the rest
+ * of a transaction.
+ *
+ * In other words, online repair only needs the transaction to collect buffer
+ * pointers and to avoid buffer deadlocks, not to guarantee consistency of
+ * updates.
+ */
+int
+xfbtree_trans_commit(
+	struct xfbtree		*xfbt,
+	struct xfs_trans	*tp)
+{
+	LIST_HEAD(buffer_list);
+	struct xfs_log_item	*lip, *n;
+	bool			corrupt = false;
+	bool			tp_dirty = false;
+
+	/*
+	 * For each xfbtree buffer attached to the transaction, write the dirty
+	 * buffers to the xfile and release them.
+	 */
+	list_for_each_entry_safe(lip, n, &tp->t_items, li_trans) {
+		struct xfs_buf	*bp = xfbtree_buf_match(xfbt, lip);
+		bool		dirty;
+
+		if (!bp) {
+			if (test_bit(XFS_LI_DIRTY, &lip->li_flags))
+				tp_dirty |= true;
+			continue;
+		}
+
+		trace_xfbtree_trans_commit_buf(xfbt, bp);
+
+		dirty = xfbtree_trans_bdetach(tp, bp);
+		if (dirty && !corrupt) {
+			xfs_failaddr_t	fa = bp->b_ops->verify_struct(bp);
+
+			/*
+			 * Because this btree is ephemeral, validate the buffer
+			 * structure before delwri_submit so that we can return
+			 * corruption errors to the caller without shutting
+			 * down the filesystem.
+			 *
+			 * If the buffer fails verification, log the failure
+			 * but continue walking the transaction items so that
+			 * we remove all ephemeral btree buffers.
+			 */
+			if (fa) {
+				corrupt = true;
+				xfs_verifier_error(bp, -EFSCORRUPTED, fa);
+			} else {
+				xfs_buf_delwri_queue_here(bp, &buffer_list);
+			}
+		}
+
+		xfs_buf_relse(bp);
+	}
+
+	/*
+	 * Reset the transaction's dirty flag to reflect the dirty state of the
+	 * log items that are still attached.
+	 */
+	tp->t_flags = (tp->t_flags & ~XFS_TRANS_DIRTY) |
+			(tp_dirty ? XFS_TRANS_DIRTY : 0);
+
+	if (corrupt) {
+		xfs_buf_delwri_cancel(&buffer_list);
+		return -EFSCORRUPTED;
+	}
+
+	if (list_empty(&buffer_list))
+		return 0;
+
+	return xfs_buf_delwri_submit(&buffer_list);
+}
+
+/*
+ * Cancel changes to the incore btree by detaching all the xfbtree buffers.
+ * Changes are not written to the backing store.  This is needed for online
+ * repair btrees, which are by nature ephemeral.
+ */
+void
+xfbtree_trans_cancel(
+	struct xfbtree		*xfbt,
+	struct xfs_trans	*tp)
+{
+	struct xfs_log_item	*lip, *n;
+	bool			tp_dirty = false;
+
+	list_for_each_entry_safe(lip, n, &tp->t_items, li_trans) {
+		struct xfs_buf	*bp = xfbtree_buf_match(xfbt, lip);
+
+		if (!bp) {
+			if (test_bit(XFS_LI_DIRTY, &lip->li_flags))
+				tp_dirty |= true;
+			continue;
+		}
+
+		trace_xfbtree_trans_cancel_buf(xfbt, bp);
+
+		xfbtree_trans_bdetach(tp, bp);
+		xfs_buf_relse(bp);
+	}
+
+	/*
+	 * Reset the transaction's dirty flag to reflect the dirty state of the
+	 * log items that are still attached.
+	 */
+	tp->t_flags = (tp->t_flags & ~XFS_TRANS_DIRTY) |
+			(tp_dirty ? XFS_TRANS_DIRTY : 0);
+}
diff --git a/fs/xfs/scrub/xfbtree.h b/fs/xfs/scrub/xfbtree.h
index e8d8c67641f8..8bd4f2bee1a8 100644
--- a/fs/xfs/scrub/xfbtree.h
+++ b/fs/xfs/scrub/xfbtree.h
@@ -22,13 +22,36 @@ struct xfs_btree_mem_head {
 /* xfile-backed in-memory btrees */
 
 struct xfbtree {
-	/* buffer cache target for this in-memory btree */
+	/* buffer cache target for the xfile backing this in-memory btree */
 	struct xfs_buftarg		*target;
 
+	/* Bitmap of free space from pos to used */
+	struct xbitmap			*freespace;
+
+	/* Number of xfile blocks actually used by this xfbtree. */
+	xfileoff_t			xf_used;
+
 	/* Owner of this btree. */
 	unsigned long long		owner;
+
+	/* Minimum and maximum records per block. */
+	unsigned int			maxrecs[2];
+	unsigned int			minrecs[2];
 };
 
+/* The head of the in-memory btree is always at block 0 */
+#define XFBTREE_HEAD_BLOCK		0
+
+/* in-memory btrees are always created with an empty leaf block at block 1 */
+#define XFBTREE_INIT_LEAF_BLOCK		1
+
+int xfbtree_head_read_buf(struct xfbtree *xfbt, struct xfs_trans *tp,
+		struct xfs_buf **bpp);
+
+void xfbtree_destroy(struct xfbtree *xfbt);
+int xfbtree_trans_commit(struct xfbtree *xfbt, struct xfs_trans *tp);
+void xfbtree_trans_cancel(struct xfbtree *xfbt, struct xfs_trans *tp);
+
 #endif /* CONFIG_XFS_BTREE_IN_XFILE */
 
 #endif /* XFS_SCRUB_XFBTREE_H__ */
diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c
index 851aeb244660..40801b08a2b2 100644
--- a/fs/xfs/scrub/xfile.c
+++ b/fs/xfs/scrub/xfile.c
@@ -292,6 +292,89 @@ xfile_pwrite(
 	return error;
 }
 
+/* Discard pages backing a range of the xfile. */
+void
+xfile_discard(
+	struct xfile		*xf,
+	loff_t			pos,
+	u64			count)
+{
+	trace_xfile_discard(xf, pos, count);
+	shmem_truncate_range(file_inode(xf->file), pos, pos + count - 1);
+}
+
+/* Ensure that there is storage backing the given range. */
+int
+xfile_prealloc(
+	struct xfile		*xf,
+	loff_t			pos,
+	u64			count)
+{
+	struct inode		*inode = file_inode(xf->file);
+	struct address_space	*mapping = inode->i_mapping;
+	const struct address_space_operations *aops = mapping->a_ops;
+	struct page		*page = NULL;
+	unsigned int		pflags;
+	int			error = 0;
+
+	if (count > MAX_RW_COUNT)
+		return -E2BIG;
+	if (inode->i_sb->s_maxbytes - pos < count)
+		return -EFBIG;
+
+	trace_xfile_prealloc(xf, pos, count);
+
+	pflags = memalloc_nofs_save();
+	while (count > 0) {
+		void		*fsdata = NULL;
+		unsigned int	len;
+		int		ret;
+
+		len = min_t(ssize_t, count, PAGE_SIZE - offset_in_page(pos));
+
+		/*
+		 * We call write_begin directly here to avoid all the freezer
+		 * protection lock-taking that happens in the normal path.
+		 * shmem doesn't support fs freeze, but lockdep doesn't know
+		 * that and will trip over that.
+		 */
+		error = aops->write_begin(NULL, mapping, pos, len, &page,
+				&fsdata);
+		if (error)
+			break;
+
+		/*
+		 * xfile pages must never be mapped into userspace, so we skip
+		 * the dcache flush.  If the page is not uptodate, zero it to
+		 * ensure we never go lacking for space here.
+		 */
+		if (!PageUptodate(page)) {
+			void	*kaddr = kmap_local_page(page);
+
+			memset(kaddr, 0, PAGE_SIZE);
+			SetPageUptodate(page);
+			kunmap_local(kaddr);
+		}
+
+		ret = aops->write_end(NULL, mapping, pos, len, len, page,
+				fsdata);
+		if (ret < 0) {
+			error = ret;
+			break;
+		}
+		if (ret != len) {
+			error = -EIO;
+			break;
+		}
+
+		count -= len;
+		pos += len;
+	}
+	memalloc_nofs_restore(pflags);
+
+	return error;
+}
+
 /* Find the next written area in the xfile data for a given offset. */
 loff_t
 xfile_seek_data(
diff --git a/fs/xfs/scrub/xfile.h b/fs/xfs/scrub/xfile.h
index c6d7851b01ca..d3b52f8069f2 100644
--- a/fs/xfs/scrub/xfile.h
+++ b/fs/xfs/scrub/xfile.h
@@ -65,6 +65,8 @@ xfile_obj_store(struct xfile *xf, const void *buf, size_t count, loff_t pos)
 	return 0;
 }
 
+void xfile_discard(struct xfile *xf, loff_t pos, u64 count);
+int xfile_prealloc(struct xfile *xf, loff_t pos, u64 count);
 loff_t xfile_seek_data(struct xfile *xf, loff_t pos);
 
 struct xfile_stat {
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index ab9217c1c3d8..e4fd81549e00 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -637,6 +637,7 @@ DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf);
 DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur);
 DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf);
 DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse);
+DEFINE_BUF_ITEM_EVENT(xfs_trans_bdetach);
 DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin);
 DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold);
 DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release);
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index d32abdd1e014..83e29bd2b2fd 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -219,6 +219,7 @@ struct xfs_buf	*xfs_trans_getsb(struct xfs_trans *);
 
 void		xfs_trans_brelse(xfs_trans_t *, struct xfs_buf *);
 void		xfs_trans_bjoin(xfs_trans_t *, struct xfs_buf *);
+void		xfs_trans_bdetach(struct xfs_trans *tp, struct xfs_buf *bp);
 void		xfs_trans_bhold(xfs_trans_t *, struct xfs_buf *);
 void		xfs_trans_bhold_release(xfs_trans_t *, struct xfs_buf *);
 void		xfs_trans_binval(xfs_trans_t *, struct xfs_buf *);
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 6549e50d852c..e28ab74af4f0 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -392,6 +392,48 @@ xfs_trans_brelse(
 	xfs_buf_relse(bp);
 }
 
+/*
+ * Forcibly detach a buffer previously joined to the transaction.  The caller
+ * will retain its locked reference to the buffer after this function returns.
+ * The buffer must be completely clean and must not be held to the transaction.
+ */
+void
+xfs_trans_bdetach(
+	struct xfs_trans	*tp,
+	struct xfs_buf		*bp)
+{
+	struct xfs_buf_log_item	*bip = bp->b_log_item;
+
+	ASSERT(tp != NULL);
+	ASSERT(bp->b_transp == tp);
+	ASSERT(bip->bli_item.li_type == XFS_LI_BUF);
+	ASSERT(atomic_read(&bip->bli_refcount) > 0);
+
+	trace_xfs_trans_bdetach(bip);
+
+	/*
+	 * Erase all recursion count, since we're removing this buffer from the
+	 * transaction.
+	 */
+	bip->bli_recur = 0;
+
+	/*
+	 * The buffer must be completely clean.  Specifically, it had better
+	 * not be dirty, stale, logged, ordered, or held to the transaction.
+	 */
+	ASSERT(!test_bit(XFS_LI_DIRTY, &bip->bli_item.li_flags));
+	ASSERT(!(bip->bli_flags & XFS_BLI_DIRTY));
+	ASSERT(!(bip->bli_flags & XFS_BLI_HOLD));
+	ASSERT(!(bip->bli_flags & XFS_BLI_LOGGED));
+	ASSERT(!(bip->bli_flags & XFS_BLI_ORDERED));
+	ASSERT(!(bip->bli_flags & XFS_BLI_STALE));
+
+	/* Unlink the log item from the transaction and drop the log item. */
+	xfs_trans_del_item(&bip->bli_item);
+	xfs_buf_item_put(bip);
+	bp->b_transp = NULL;
+}
+
 /*
  * Mark the buffer as not needing to be unlocked when the buf item's
  * iop_committing() routine is called.  The buffer must already be locked


  parent reply	other threads:[~2023-05-26  1:07 UTC|newest]

Thread overview: 388+ 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   ` [PATCH 4/6] xfs: zap broken inode forks Darrick J. Wong
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   ` Darrick J. Wong [this message]
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
2023-12-31 19:27 [PATCHSET v29.0 08/28] xfs: support in-memory btrees Darrick J. Wong
2023-12-31 20:15 ` [PATCH 9/9] xfs: connect in-memory btrees to xfiles Darrick J. Wong
2024-01-01  0:18   ` Matthew Wilcox
2024-01-03  2:04     ` Darrick J. Wong
2024-01-04  6:54   ` Christoph Hellwig
2024-01-04  7:32     ` Darrick J. Wong
2024-01-04  7:41       ` Christoph Hellwig

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=168506061984.3733082.16963285502416228181.stgit@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=willy@infradead.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.