Btrfs: fix wrong missing device counter decrease
The missing devices are accounted by its own fs device, for example the missing devices in seed filesystem will be accounted by the fs device of the seed filesystem, not by the new filesystem which is based on the seed filesystem, so when we remove the missing device in the seed filesystem, we should decrease the counter of its own fs device. Fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
69611ac810
commit
3a7d55c84c
1 changed files with 1 additions and 1 deletions
|
@ -1718,7 +1718,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
|
|||
device->fs_devices->total_devices--;
|
||||
|
||||
if (device->missing)
|
||||
root->fs_info->fs_devices->missing_devices--;
|
||||
device->fs_devices->missing_devices--;
|
||||
|
||||
next_device = list_entry(root->fs_info->fs_devices->devices.next,
|
||||
struct btrfs_device, dev_list);
|
||||
|
|
Loading…
Reference in a new issue