mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-28 06:34:17 +08:00
btrfs-progs: track num_devices per fs_devices
Similar to the kernel we need to track the number of devices scanned per fs_devices. A preparation patch to fix incomplete fsid changing. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5c7f36b141
commit
4a253f713e
@ -406,6 +406,7 @@ static int device_list_add(const char *path,
|
||||
btrfs_stack_device_bytes_used(&disk_super->dev_item);
|
||||
list_add(&device->dev_list, &fs_devices->devices);
|
||||
device->fs_devices = fs_devices;
|
||||
fs_devices->num_devices++;
|
||||
} else if (!device->name || strcmp(device->name, path)) {
|
||||
char *name;
|
||||
|
||||
|
@ -88,6 +88,7 @@ struct btrfs_fs_devices {
|
||||
u64 latest_trans;
|
||||
u64 lowest_devid;
|
||||
|
||||
u64 num_devices;
|
||||
u64 missing_devices;
|
||||
u64 total_rw_bytes;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user