]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: introduce allocation cursor data structure
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)
commit2950989c762c327925c36c19c03b47845ffc71e0
tree2c8e9e1973811064438216193ab4d5f44bba1037
parent7777d8c6f4808e123e9dcdb1472d0bdc3ee2fa79
xfs: introduce allocation cursor data structure

Source kernel commit: f5e7dbea1e3ecc27f05e8cc83614c206903cc97a

Introduce a new allocation cursor data structure to encapsulate the
various states and structures used to perform an extent allocation.
This structure will eventually be used to track overall allocation
state across different search algorithms on both free space btrees.

To start, include the three btree cursors (one for the cntbt and two
for the bnobt left/right search) used by the near mode allocation
algorithm and refactor the cursor setup and teardown code into
helpers. This slightly changes cursor memory allocation patterns,
but otherwise makes no functional changes to the allocation
algorithm.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
[darrick: fix sparse complaints]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_alloc.c