]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: track active state of allocation btree cursors
authorBrian Foster <bfoster@redhat.com>
Thu, 16 Jan 2020 22:13:32 +0000 (17:13 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 16 Jan 2020 22:13:32 +0000 (17:13 -0500)
commit7777d8c6f4808e123e9dcdb1472d0bdc3ee2fa79
tree01a8c2c3251cfd2421263f15d0621168e784bce9
parent75f533e65659d7fe279b663f56c2e8a26035bef5
xfs: track active state of allocation btree cursors

Source kernel commit: f6b428a46d60186a38105c71fa435f31240721f9

The upcoming allocation algorithm update searches multiple
allocation btree cursors concurrently. As such, it requires an
active state to track when a particular cursor should continue
searching. While active state will be modified based on higher level
logic, we can define base functionality based on the result of
allocation btree lookups.

Define an active flag in the private area of the btree cursor.
Update it based on the result of lookups in the existing allocation
btree helpers. Finally, provide a new helper to query the current
state.

Signed-off-by: Brian Foster <bfoster@redhat.com>
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
libxfs/xfs_alloc_btree.c
libxfs/xfs_btree.h