• Brian Foster's avatar
    xfs: introduce allocation cursor data structure · f5e7dbea
    Brian Foster authored
    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: default avatarBrian Foster <bfoster@redhat.com>
    Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    [darrick: fix sparse complaints]
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    f5e7dbea
xfs_alloc.c 87.3 KB