public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v29.2 7/8] xfs: online repair of rmap btrees
@ 2024-02-01 19:39 Darrick J. Wong
  2024-02-01 19:58 ` [PATCH 1/5] xfs: create a helper to decide if a file mapping targets the rt volume Darrick J. Wong
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Darrick J. Wong @ 2024-02-01 19:39 UTC (permalink / raw)
  To: djwong; +Cc: Christoph Hellwig, hch, linux-xfs

Hi all,

We have now constructed the four tools that we need to scan the
filesystem looking for reverse mappings: an inode scanner, hooks to
receive live updates from other writer threads, the ability to construct
btrees in memory, and a btree bulk loader.

This series glues those three together, enabling us to scan the
filesystem for mappings and keep it up to date while other writers run,
and then commit the new btree to disk atomically.

To reduce the size of each patch, the functionality is left disabled
until the end of the series and broken up into three patches: one to
create the mechanics of scanning the filesystem, a second to transition
to in-memory btrees, and a third to set up the live hooks.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=repair-rmap-btree

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=repair-rmap-btree

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=repair-rmap-btree
---
Commits in this patchset:
 * xfs: create a helper to decide if a file mapping targets the rt volume
 * xfs: create agblock bitmap helper to count the number of set regions
 * xfs: repair the rmapbt
 * xfs: create a shadow rmap btree during rmap repair
 * xfs: hook live rmap operations during a repair operation
---
 fs/xfs/Makefile                |    1 
 fs/xfs/libxfs/xfs_ag.c         |    1 
 fs/xfs/libxfs/xfs_ag.h         |    4 
 fs/xfs/libxfs/xfs_bmap.c       |   49 +
 fs/xfs/libxfs/xfs_bmap.h       |    8 
 fs/xfs/libxfs/xfs_inode_fork.c |    9 
 fs/xfs/libxfs/xfs_inode_fork.h |    1 
 fs/xfs/libxfs/xfs_rmap.c       |  190 +++-
 fs/xfs/libxfs/xfs_rmap.h       |   30 +
 fs/xfs/libxfs/xfs_rmap_btree.c |  163 ++++
 fs/xfs/libxfs/xfs_rmap_btree.h |    6 
 fs/xfs/libxfs/xfs_shared.h     |   10 
 fs/xfs/scrub/agb_bitmap.h      |    5 
 fs/xfs/scrub/bitmap.c          |   14 
 fs/xfs/scrub/bitmap.h          |    2 
 fs/xfs/scrub/bmap.c            |    2 
 fs/xfs/scrub/common.c          |    5 
 fs/xfs/scrub/common.h          |    1 
 fs/xfs/scrub/newbt.c           |   12 
 fs/xfs/scrub/newbt.h           |    7 
 fs/xfs/scrub/reap.c            |    2 
 fs/xfs/scrub/repair.c          |   59 +
 fs/xfs/scrub/repair.h          |   12 
 fs/xfs/scrub/rmap.c            |   11 
 fs/xfs/scrub/rmap_repair.c     | 1697 ++++++++++++++++++++++++++++++++++++++++
 fs/xfs/scrub/scrub.c           |    6 
 fs/xfs/scrub/scrub.h           |    4 
 fs/xfs/scrub/trace.c           |    1 
 fs/xfs/scrub/trace.h           |   80 ++
 fs/xfs/xfs_stats.c             |    3 
 fs/xfs/xfs_stats.h             |    1 
 31 files changed, 2326 insertions(+), 70 deletions(-)
 create mode 100644 fs/xfs/scrub/rmap_repair.c


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-02-02  6:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-01 19:39 [PATCHSET v29.2 7/8] xfs: online repair of rmap btrees Darrick J. Wong
2024-02-01 19:58 ` [PATCH 1/5] xfs: create a helper to decide if a file mapping targets the rt volume Darrick J. Wong
2024-02-01 19:59 ` [PATCH 2/5] xfs: create agblock bitmap helper to count the number of set regions Darrick J. Wong
2024-02-02  6:28   ` Christoph Hellwig
2024-02-01 19:59 ` [PATCH 3/5] xfs: repair the rmapbt Darrick J. Wong
2024-02-02  6:28   ` Christoph Hellwig
2024-02-01 19:59 ` [PATCH 4/5] xfs: create a shadow rmap btree during rmap repair Darrick J. Wong
2024-02-02  6:28   ` Christoph Hellwig
2024-02-01 19:59 ` [PATCH 5/5] xfs: hook live rmap operations during a repair operation Darrick J. Wong
2024-02-02  6:29   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox