diff options
author | Brian Foster <bfoster@redhat.com> | 2018-07-12 08:26:29 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-12 08:26:29 +0300 |
commit | cf612de732cb6ef626019ca085406d183f0a055a (patch) | |
tree | f95e717e594fba97786d2233f24753c349b4792d /fs/xfs/libxfs/xfs_btree.h | |
parent | 280253d213fb735b565532be2836f94cf574260d (diff) | |
download | linux-cf612de732cb6ef626019ca085406d183f0a055a.tar.xz |
xfs: remove xfs_btree_cur private firstblock field
The bmbt cursor private structure has a firstblock field that is
used to maintain locking order on bmbt allocations. The field holds
an actual firstblock value (as opposed to a pointer), so it is
initialized on cursor creation, updated on allocation and then the
value is transferred back to the source before the cursor is
destroyed.
This value is always transferred from and back to the ->t_firstblock
field. Since xfs_btree_cur already carries a reference to the
transaction, we can remove this field from xfs_btree_cur and the
associated copying. The bmbt allocations will update the value in
the transaction directly.
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h index b986a8fc8d40..503615f4d729 100644 --- a/fs/xfs/libxfs/xfs_btree.h +++ b/fs/xfs/libxfs/xfs_btree.h @@ -214,7 +214,6 @@ typedef struct xfs_btree_cur } a; struct { /* needed for BMAP */ struct xfs_inode *ip; /* pointer to our inode */ - xfs_fsblock_t firstblock; /* 1st blk allocated */ int allocated; /* count of alloced */ short forksize; /* fork's inode space */ char whichfork; /* data or attr fork */ |