mbox series

[0/3] xfs: scrub filesystem summary counters

Message ID 155546519998.176278.8300210828717055034.stgit@magnolia (mailing list archive)
Headers show
Series xfs: scrub filesystem summary counters | expand

Message

Darrick J. Wong April 17, 2019, 1:40 a.m. UTC
Hi all,

This patch series introduces a totally new filesystem summary counter
online scrub feature.  Whereas previous iterations froze the filesystem
to count inodes and free blocks, this one drastically reduces overhead
by loosening its precision somewhat.  Instead of freezing the fs, we
race the expected summary counter calculation with normal fs operations
and use thresholding to check that the counters are in the ballpark,
where ballpark means "off by less than 6% or so".

The first patch implements a per-cpu counter of the number of blocks
being held in delayed allocation reservations.  This should represent
the difference between the incore fdblocks counter and the one that
would be recorded on disk if one were to iterate all the committed
metadata structures.

Patch #2 enables the scrub code to pause the posteof and cowblocks
background reclamation workers temporarily to reduce perturbations in
the summary counters while the scrubber runs.  This isn't totally
foolproof since they can be re-armed, but we only need ballpark
correctness.

Finally, patch #3 implements the actual fs summary counter scrubber
code.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  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=scrub-summary-counters

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=scrub-summary-counters