]> git.hungrycats.org Git - linux/commit
btrfs: increment extent count once when logging extents during fast fsync
authorFilipe Manana <fdmanana@suse.com>
Wed, 9 Sep 2026 11:26:30 +0000 (12:26 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Sep 2026 12:55:21 +0000 (14:55 +0200)
commit8388590012a11564ddb27286d428ff7bcf55c061
tree86c67f04a13a926031dce29846c7479d06352df2
parent3f7a2f42d6d2f1e4226b394b0c772eff01b90b50
btrfs: increment extent count once when logging extents during fast fsync

In btrfs_log_changed_extents() we increment the extent count twice, and
we then fallback to a transaction commit if the count reaches a threshold
of 32K. However we increment the count twice, which is confusing and
pointless. So increment the count only once and reduce the threshold to
half (16K).

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/tree-log.c