diff options
author | Brian Foster <bfoster@redhat.com> | 2019-10-13 17:10:31 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-10-21 09:04:58 -0700 |
commit | f6b428a46d60186a38105c71fa435f31240721f9 (patch) | |
tree | b4f7da6314bb3b014431b194c9ebc3eefee9f990 /fs/xfs/libxfs/xfs_alloc_btree.c | |
parent | bdb2ed2dbdc227a97e8f37ecf0effc3537bcf789 (diff) | |
download | linux-f6b428a46d60186a38105c71fa435f31240721f9.tar.gz linux-f6b428a46d60186a38105c71fa435f31240721f9.tar.bz2 linux-f6b428a46d60186a38105c71fa435f31240721f9.zip |
xfs: track active state of allocation btree cursors
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc_btree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc_btree.c b/fs/xfs/libxfs/xfs_alloc_btree.c index 2a94543857a1..279694d73e4e 100644 --- a/fs/xfs/libxfs/xfs_alloc_btree.c +++ b/fs/xfs/libxfs/xfs_alloc_btree.c @@ -507,6 +507,7 @@ xfs_allocbt_init_cursor( cur->bc_private.a.agbp = agbp; cur->bc_private.a.agno = agno; + cur->bc_private.a.priv.abt.active = false; if (xfs_sb_version_hascrc(&mp->m_sb)) cur->bc_flags |= XFS_BTREE_CRC_BLOCKS; |