]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: only reserve quota blocks for bmbt changes if we're changing the data fork
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Jun 2020 21:47:19 +0000 (14:47 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Jul 2020 17:46:57 +0000 (10:46 -0700)
commit7b3374f9265e23435d8cad37729844f373c0b4ed
treee445d2cc344d8f4d0526d5cf229fc23cd9c035c0
parenta722e618f9d38b76043094d2d60cffb962076dac
xfs: only reserve quota blocks for bmbt changes if we're changing the data fork

Now that we've reworked xfs_reflink_remap_extent to remap only one
extent per transaction, we actually know if the extent being removed is
an allocated mapping.  This means that we now know ahead of time if
we're going to be touching the data fork.

Since we only need blocks for a bmbt split if we're going to update the
data fork, we only need to get quota reservation if we know we're going
to touch the data fork.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_reflink.c