]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
xfs: skip small alloc cntbt logic on NULL cursor
authorBrian Foster <bfoster@redhat.com>
Sat, 29 Jun 2019 02:30:20 +0000 (19:30 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 29 Jun 2019 02:30:20 +0000 (19:30 -0700)
commit6691cd9267c1c588d1f8e097c175d7c9670c7fc1
tree6ddefbe142c1e4a2f1db2336317bcbe0ab6e9118
parentc63cdd4fc9cc6a22d6e0bd0dcba4a28d18eab723
xfs: skip small alloc cntbt logic on NULL cursor

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>
fs/xfs/libxfs/xfs_alloc.c