]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: drop extra transaction roll from inode extent truncate
authorBrian Foster <bfoster@redhat.com>
Wed, 16 Sep 2020 03:44:46 +0000 (20:44 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Sep 2020 16:54:29 +0000 (09:54 -0700)
commit0bc4e560402fea770e4a4400f9a05c065100b6f1
treeda43d41d66d8b74d25c91bb94794c2427a6bbdce
parent6834953c44b6d4c58939f516391fac2885c94e7c
xfs: drop extra transaction roll from inode extent truncate

The inode extent truncate path unmaps extents from the inode block
mapping, finishes deferred ops to free the associated extents and
then explicitly rolls the transaction before processing the next
extent. The latter extent roll is spurious as xfs_defer_finish()
always returns a clean transaction and automatically relogs inodes
attached to the transaction (with lock_flags == 0). This can
unnecessarily increase the number of log ticket regrants that occur
during a long running truncate operation. Remove the explicit
transaction roll.

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>
fs/xfs/xfs_inode.c