]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: skip small alloc cntbt logic on NULL cursor
authorBrian Foster <bfoster@redhat.com>
Wed, 14 Aug 2019 22:05:16 +0000 (18:05 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 14 Aug 2019 22:05:16 +0000 (18:05 -0400)
commit05479bb93b567411b27af9c36c1991a5f268e4cf
treedde59ce180406330e5f111953340d5dcd053d49f
parent23280935ca898593b1395974304c41ff2812ef5c
xfs: skip small alloc cntbt logic on NULL cursor

Source kernel commit: 6691cd9267c1c588d1f8e097c175d7c9670c7fc1

The small allocation helper is implemented in a way that is fairly
tightly integrated to the existing allocation algorithms. It expects
a cntbt cursor beyond the end of the tree, attempts to locate the
last record in the tree and only attempts an AGFL allocation if the
cntbt is empty.

The upcoming generic algorithm doesn't rely on the cntbt processing
of this function. It will only call this function when the cntbt
doesn't have a big enough extent or is empty and thus AGFL
allocation is the only remaining option. Tweak
xfs_alloc_ag_vextent_small() to handle a NULL cntbt cursor and skip
the cntbt logic. This facilitates use by the existing allocation
code and new code that only requires an AGFL allocation attempt.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_alloc.c