tag name | repair-rmap-live_2021-12-15 (d85d6b3bc2bbdebd76eaaf1b3475774bf0787654) |
tag date | 2021-12-15 17:31:17 -0800 |
tagged by | Darrick J. Wong <djwong@kernel.org> |
tagged object | commit 1c6d7a0613... |
xfs: repair rmap btrees without freezing
The last time I sent out online repair for review, Dave Chinner noted
that online repair isn't that any better than offline repair if we have
to freeze the entire filesystem to scan every file in the filesystem.
I don't agree with the degree of that assessment (you don't have to
unmount!) it's quite possible to do better.
This patchset modifies the xfs buffer cache to be capable of using an
xfile (aka a shmem file) as a backing device, in addition to regular
block devices. It then augments the btree code to support creating
btree cursors with buffers that come from a buftarg other than the data
device (namely an xfile-backed buftarg) and then revamps the rmap and
rtrmap repair code to build an in-memory btree instead of the xfarray
that the initial version used.
Finally, we wire up a new hook in the rmap code so that the rmap repair
code can receive notifications of updates going on from other threads.
With this capability, the rmap repair code can scan the whole filesystem
without holding locks (or freezing the fs) to create an in-memory btree;
and other writer threads help us keep it up to date.
IOWs, this eliminates all but one of the online fsck types that require
freezing.
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmG6luUACgkQ+H93GTRK
tOuftxAAnhIlbphlxF9Gn7s6Ed79vQW+qwgNWzg8z3w4Mg7qU2YUwxPM+U7sqr/3
Phjd0z7Gdjhh8It3ul79ZKRggpdCjM2T7TBJbHpGPvSwkPDGaBmJe9SfzHJWN/U2
StWj7Fa6qn/ZIgQnp5Ixvju5UCr9/KeelpLSyCQgJ/N126zesprug1axjCQ5Ribb
4ekURUAsjTR0NkLXQY6teUuopB8VKmP7egMPGHvVYhkyb4G5RNurodQPIA+46p5H
dhJEl/ssI49qROJ4rC1/9jcfWa6OY/IXu2htPQoDaNVZ5hGvzjmDyobixqTyN4cY
Ubq9Ehe0rFSmT+tqRNzKd+QP5LFHjmwwNYjt0TupaXLe5Ezru636wn7CIgaPxygA
4VCDy39mvi/JhziiStIOrUP9UEj9faNmNVjWsZkO7u+pPSnkl1QMbBB5rqNsIjkd
1GCLJBhF+WHaHN166Ax2Q4Jh3XEqQZRlD/BrQ8ObYkZ9nRXXGCWGAfN0fkVUawgw
gzgqmCyChq40WRsn+/kFyC555sgalafF0x5eGP9jLrmk7Ts2X1SyuQJo/HnmTjmR
Ja01sd2hOTVHlhbDUpMQ7IO6Bw/jB7jBfkWGsgRQTsy0lEuq6GqFtJEdt5i2KKRs
EQbQ7CKNbsJKWjn7qnU3OOyfBePO91DvVGIhp12cpVJX+s6a/Co=
=IvUx
-----END PGP SIGNATURE-----