Commit add9745a authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: add comments for device counts in struct btrfs_fs_devices

A bug was was checking a wrong device count before we delete the struct
btrfs_fs_devices in btrfs_rm_device(). To avoid future confusion and
easy reference add a comment about the various device counts that we have
in the struct btrfs_fs_devices.
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 8e906945
...@@ -236,11 +236,30 @@ struct btrfs_fs_devices { ...@@ -236,11 +236,30 @@ struct btrfs_fs_devices {
bool fsid_change; bool fsid_change;
struct list_head fs_list; struct list_head fs_list;
/*
* Number of devices under this fsid including missing and
* replace-target device and excludes seed devices.
*/
u64 num_devices; u64 num_devices;
/*
* The number of devices that successfully opened, including
* replace-target, excludes seed devices.
*/
u64 open_devices; u64 open_devices;
/* The number of devices that are under the chunk allocation list. */
u64 rw_devices; u64 rw_devices;
/* Count of missing devices under this fsid excluding seed device. */
u64 missing_devices; u64 missing_devices;
u64 total_rw_bytes; u64 total_rw_bytes;
/*
* Count of devices from btrfs_super_block::num_devices for this fsid,
* which includes the seed device, excludes the transient replace-target
* device.
*/
u64 total_devices; u64 total_devices;
/* Highest generation number of seen devices */ /* Highest generation number of seen devices */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment