btrfs: set EXTENT_NORESERVE before range unlock in btrfs_truncate_block()
authorFilipe Manana <fdmanana@suse.com>
Tue, 8 Jul 2025 15:32:33 +0000 (16:32 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 22:09:22 +0000 (00:09 +0200)
commitbfc9d71aa41d6cfc32b60318222b3e65352b0776
tree7d4f96581fc39c5e540ed675953e5e8456556a9b
parent5ae011bcbb5ac088e5fa41fcaf3896fc866c0b9a
btrfs: set EXTENT_NORESERVE before range unlock in btrfs_truncate_block()

Set the EXTENT_NORESERVE bit in the io tree before unlocking the range so
that we can use the cached state and speedup the operation, since the
unlock operation releases the cached state.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c