diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-01-21 15:24:39 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-01-24 00:34:17 +0300 |
commit | fdef89ce6fada462aef9cb90a140c93c8c209f0f (patch) | |
tree | 9ea7ea230ef6b7e9597ae43439af4f13d5df9ac1 /scripts/extract-fwblobs | |
parent | e2f0943cf37305dbdeaf9846e3c941451bcdef63 (diff) | |
download | linux-fdef89ce6fada462aef9cb90a140c93c8c209f0f.tar.xz |
btrfs: avoid starting new transaction when cleaning qgroup during subvolume drop
At btrfs_qgroup_cleanup_dropped_subvolume() all we want to commit the
current transaction in order to have all the qgroup rfer/excl numbers up
to date. However we are using btrfs_start_transaction(), which joins the
current transaction if there is one that is not yet committing, but also
starts a new one if there is none or if the current one is already
committing (its state is >= TRANS_STATE_COMMIT_START). This later case
results in unnecessary IO, wasting time and a pointless rotation of the
backup roots in the super block.
So instead of using btrfs_start_transaction() followed by a
btrfs_commit_transaction(), use btrfs_commit_current_transaction() which
achieves our purpose and avoids starting and committing new transactions.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions