xfs: update the pag for the last AG at recovery time
authorChristoph Hellwig <hch@lst.de>
Mon, 14 Oct 2024 06:04:55 +0000 (08:04 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 22 Oct 2024 11:37:19 +0000 (13:37 +0200)
commit4a201dcfa1ff0dcfe4348c40f3ad8bd68b97eb6c
tree9a3ee3d41a0955b380f3c82b7420ed06cd39e65a
parent069cf5e32b700f94c6ac60f6171662bdfb04f325
xfs: update the pag for the last AG at recovery time

Currently log recovery never updates the in-core perag values for the
last allocation group when they were grown by growfs.  This leads to
btree record validation failures for the alloc, ialloc or finotbt
trees if a transaction references this new space.

Found by Brian's new growfs recovery stress test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/libxfs/xfs_ag.c
fs/xfs/libxfs/xfs_ag.h
fs/xfs/xfs_buf_item_recover.c