]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: disentagle EFI release from the extent count
authorBrian Foster <bfoster@redhat.com>
Tue, 18 Aug 2015 23:50:12 +0000 (09:50 +1000)
committerJack Vogel <jack.vogel@oracle.com>
Mon, 9 Apr 2018 22:57:18 +0000 (15:57 -0700)
commitfcf60ba46e15fbf960e4ffe822434c4075d633a5
tree05a11e2aaf175926c3facccbad839851e38eab0a
parentf6be91e89eacc23626db81355a4b13a1d1c6fa62
xfs: disentagle EFI release from the extent count

[ Upstream commit 5e4b5386a2c29429add601c8cfb45bb10d80c490 ]

Release of the EFI either occurs based on the reference count or the
extent count. The extent count used is either the count tracked in
the EFI or EFD, depending on the particular situation. In either
case, the count is initialized to the final value and thus always
matches the current efi_next_extent value once the EFI is completely
constructed.  For example, the EFI extent count is increased as the
extents are logged in xfs_bmap_finish() and the full free list is
always completely processed. Therefore, the count is guaranteed to
be complete once the EFI transaction is committed. The EFD uses the
efd_nextents counter to release the EFI. This counter is initialized
to the count of the EFI when the EFD is created. Thus the EFD, as
currently used, has no concept of partial EFI release based on
extent count.

Given that the EFI extent count is always released in whole, use of
the extent count for reference counting is unnecessary. Remove this
level of the API and release the EFI based on the core reference
count. The efi_next_extent counter remains because it is still used
to track the slot to log the next extent to free.

Orabug: 27609404
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: wen.gang.wang@oracle.com
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_extfree_item.h
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_trans.h