summaryrefslogtreecommitdiff
tag namescrub-drain-intents_2022-11-09 (18f75fdd8659059b0c7442b26380f51f3a11515a)
tag date2022-11-09 19:09:37 -0800
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit ba882f9137...
xfs: drain deferred work items when scrubbing
The design doc for XFS online fsck contains a long discussion of the eventual consistency models in use for XFS metadata. In that chapter, we note that it is possible for scrub to collide with a chain of deferred space metadata updates, and proposes a lightweight solution: The use of a pending-intents counter so that scrub can wait for the system to drain all chains. This patchset implements that scrub drain. The first patch implements the basic mechanism, and the subsequent patches reduce the runtime overhead by converting the implementation to use sloppy counters and introducing jump labels to avoid walking into scrub hooks when it isn't running. This last paradigm repeats elsewhere in this megaseries. v23.1: make intent items take an active ref to the perag structure and document why we bump and drop the intent counts when we do Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmNsa3EACgkQ+H93GTRK tOvRXQ/+M7/pxeJ+QyzwaKP3XH/n9oLtNRjI4uXXDKxdViHKOrbUvftRQ84sMd3c Dc0sy47nvpnlKWJaYUDI3y7OKt40OfKSgiaC1W+fah6wvQIwa33GiyPlia/XsMx0 KyZDULIQBs+XsxLWfuzbD5OvzCkwUARQj5cPI1yIvpCzZ89nPbRW3RNFJEUZEfuQ C71PhC7ukWPV20BPX0xCpbvumw2KupYtYuso68DPWpXxntzMaQVJodacrfrMdSXz CHZ2htL0/lz/q0xrgcRsTB29vPoPlUFZvlslbkpV6ZVE3p/d1hU6qNMppAXrNeLN W7zvmh9FY3avSUk8qEhoP8BgKMbZHJYAmZ8Yiuz9fLfaB5GKMX1VliqqhdUj1SWJ nkmRpho385DyOAkO6NoYW6NgcYG704ZlFgZv3W+t3Tgw4dkGCVBulzvekdm1xxqt Ohzeqmc25IUVIrsvOL1Xfddy9PKoRIiISbxZGX6OPUFiUzqnQBlyJ5GDPENPxKtw SS+DLZXNSYI0zeR79ZLcrXvFC3cgHp8aGI1Po9Sw+/DGy0G0DeqZwlufhW4ffZEa iQFxPkL7NXaxdDaSIA2mn7+ch+FnZaYNV7UvtXtKP8jyoDKX6zdMBaqS4rjymXsZ IV+FAHYlxlZvfLpT+EAZ30+Of6fkr6iCzrdZksaP2jalKdfgtQc= =Yhg/ -----END PGP SIGNATURE-----