]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: remove xfs_btree_cur private firstblock field
authorBrian Foster <bfoster@redhat.com>
Fri, 5 Oct 2018 02:36:09 +0000 (21:36 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 5 Oct 2018 02:36:09 +0000 (21:36 -0500)
commitf44a348bf9c6d46ca1516d8ee37ae805979d995e
treef61ccfe9af472796d52087a562d4a865647cb3ca
parentf72535055a4bddde80665b10c439b628981b8c3f
xfs: remove xfs_btree_cur private firstblock field

Source kernel commit: cf612de732cb6ef626019ca085406d183f0a055a

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.h