diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-07-26 16:57:10 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:18 +0200 |
commit | 2391245ac2875f784335b9148079c6e73639a5f7 (patch) | |
tree | d5d04cbbaffdd576bc3a5ec0c73338c2b28f905f /fs/d_path.c | |
parent | ed8947bc73aa5bf0ddb5473eafadaa5d740f2f3f (diff) | |
download | linux-2391245ac2875f784335b9148079c6e73639a5f7.tar.gz linux-2391245ac2875f784335b9148079c6e73639a5f7.tar.bz2 linux-2391245ac2875f784335b9148079c6e73639a5f7.zip |
btrfs: avoid starting new transaction when flushing delayed items and refs
When flushing space we join a transaction to flush delayed items and
delayed references, in order to try to release space. However using
btrfs_join_transaction() not only joins an existing transaction as well
as it starts a new transaction if there is none open. If there is no
transaction open, we don't have neither delayed items nor delayed
references, so creating a new transaction is a waste of time, IO and
creates an unnecessary rotation of the backup roots without gaining any
benefits (including releasing space).
So use btrfs_join_transaction_nostart() when attempting to flush delayed
items and references.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/d_path.c')
0 files changed, 0 insertions, 0 deletions