]> Gentwo Git Trees - linux/.git/commit
btrfs: add path for subvolume tree changes to struct walk_control
authorFilipe Manana <fdmanana@suse.com>
Tue, 2 Sep 2025 11:16:17 +0000 (12:16 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 23 Sep 2025 06:49:20 +0000 (08:49 +0200)
commit1ebeee283a2ac8ea29a705d7f03a15e3aae30f22
treea93b791edde3c172ec5a2a40ee4faa887cb49a04
parentf9c02e4b525d766bebfcbeac1b25b03aacfe62f1
btrfs: add path for subvolume tree changes to struct walk_control

While replaying log trees we need to do searches and updates to subvolume
trees and for that we use a path that we allocate in replay_one_buffer()
and then pass it as a parameter to other functions deeper in the log
replay call chain. Instead of passing it as parameter, add it to struct
walk_control since we pass a pointer to that structure for every log
replay function.

This reduces the number of arguments passed to the functions and it will
be needed and important for an upcoming changes that improves error
reporting for log replay. Also name the new filed in struct walk_control
to 'subvol_path' - while that is longer to type, the naming makes it clear
it's used for subvolume tree operations since many of the log replay
functions operate both on subvolume and log trees, and for the log tree
searches we have struct walk_control::log_leaf to also make it obvious
it's an extent buffer for a log tree extent buffer.

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