aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2018-08-10 13:53:21 +0800
committerDavid Sterba <dsterba@suse.com>2018-10-15 17:23:26 +0200
commit1da739678e0b7a764a0f1ef46886f919f19f6446 (patch)
tree87de705dbdf8b00742b1811da20ac9b03bca14bc /fs/btrfs/dev-replace.c
parentbtrfs: add assertions where number of devices could go below 0 (diff)
downloadwireguard-linux-1da739678e0b7a764a0f1ef46886f919f19f6446.tar.xz
wireguard-linux-1da739678e0b7a764a0f1ef46886f919f19f6446.zip
btrfs: add helper to obtain number of devices with ongoing dev-replace
When the replace is running the fs_devices::num_devices also includes the replaced device, however in some operations like device delete and balance it needs the actual num_devices without the repalced devices. The function btrfs_num_devices() just provides that. And here is a scenario how balance and repalce items could co-exist: Consider balance is started and paused, now start the replace followed by a unmount or system power-cycle. During following mount, the open_ctree() first restarts the balance so it must check for the device replace otherwise our num_devices calculation will be wrong. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> [ update changelog ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions