diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2026-10-12 23:05:59 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-10-14 09:49:28 +0200 |
| commit | ca12256b7f9820aafb361ac496f048d2d4a71c23 (patch) | |
| tree | 499298f97258d181f96333f9252e739ef67c8957 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 147f9f8300cb284923e08bb8a7b32ba9681c45ed (diff) | |
| download | linux-ca12256b7f9820aafb361ac496f048d2d4a71c23.tar.gz linux-ca12256b7f9820aafb361ac496f048d2d4a71c23.zip | |
xfs: avoid oversized space allocations when regenerating metadata
LOLLM notices that the btree block preallocation code can be asked to
allocate more than XFS_MAX_BMBT_EXTLEN blocks. If the allocation
succeeds, the reservation will be stored in a single autoreap record.
Unfortunately, the autoreap code uses deferred frees to get rid of
unused space and that code complains if it's given too much space to get
rid of all once. Fix this theoretical problem by constraining the
allocation size since it's unlikely that we're going to need that much
space for a btree. We don't fix the core code because the runtime users
of deferred frees are freeing file space or single btree blocks and we
want to catch problems there.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
