xfs: constrain dirty buffers while formatting a staged btree
authorDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:29 +0000 (10:03 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:29 +0000 (10:03 -0800)
commite069d549705e49841247acf9b3176744e27d5425
tree6e817d7ada375e76eb98e27bd45d797c5e2a72d5
parent6dfeb0c2ecde71d61af77f65eabbdd6ca9315161
xfs: constrain dirty buffers while formatting a staged btree

Constrain the number of dirty buffers that are locked by the btree
staging code at any given time by establishing a threshold at which we
put them all on the delwri queue and push them to disk.  This limits
memory consumption while writing out new btrees.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_btree_staging.c
fs/xfs/libxfs/xfs_btree_staging.h
fs/xfs/scrub/newbt.c