]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: remove max_mirrors argument from write_all_supers()
authorFilipe Manana <fdmanana@suse.com>
Tue, 3 Feb 2026 19:45:14 +0000 (19:45 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Apr 2026 16:55:54 +0000 (18:55 +0200)
commit8f3fc2d8973af8dc5559ecbbfb5ed3b19b2e8fa5
tree0c1c739b91457924a5845ccc3d3859a561419521
parentabd5e352b160f251ba1a481c03cdd7653557d0f2
btrfs: remove max_mirrors argument from write_all_supers()

There's no need to pass max_mirrors to write_all_supers() since from the
given transaction handle we can infer if we are in a transaction commit
or fsync context, so we can determine how many mirrors we need to use.

So remove the max_mirror argument from write_all_supers() and stop
adjusting it in the callees write_dev_supers() and wait_dev_supers(),
simplifying them besides the parameter list for write_all_supers().

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/transaction.c
fs/btrfs/tree-log.c