summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_globals.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-12-15 21:03:28 +0300
committerDarrick J. Wong <djwong@kernel.org>2023-12-15 21:03:28 +0300
commit26de64629d8b439a03bce243f14a46f7440729f3 (patch)
tree1b904b1e730563e1be156704c67c185e77b69c5c /fs/xfs/xfs_globals.c
parentc1e0f8e6fb060b23b6f1b82eb4265983f7d271f8 (diff)
downloadlinux-26de64629d8b439a03bce243f14a46f7440729f3.tar.xz
xfs: read leaf blocks when computing keys for bulkloading into node blocks
When constructing a new btree, xfs_btree_bload_node needs to read the btree blocks for level N to compute the keyptrs for the blocks that will be loaded into level N+1. The level N blocks must be formatted at that point. A subsequent patch will change the btree bulkloader to write new btree blocks in 256K chunks to moderate memory consumption if the new btree is very large. As a consequence of that, it's possible that the buffers for lower level blocks might have been reclaimed by the time the node builder comes back to the block. Therefore, change xfs_btree_bload_node to read the lower level blocks to handle the reclaimed buffer case. As a side effect, the read will increase the LRU refs, which will bias towards keeping new btree buffers in memory after the new btree commits. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_globals.c')
0 files changed, 0 insertions, 0 deletions