提交 b2efedca 编写于 作者: A Anand Jain 提交者: Chris Mason

btrfs: rw_devices shouldn't be incremented for seed fs in btrfs_rm_dev_replace_srcdev()

seed fs devices don't participate as rw_device, so don't increment
rw_devices when the device being handled belongs to a seed fs.
Signed-off-by: NAnand Jain <anand.jain@oracle.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 8bef8401
...@@ -1832,7 +1832,8 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info, ...@@ -1832,7 +1832,8 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info,
fs_devices->num_devices--; fs_devices->num_devices--;
if (srcdev->missing) { if (srcdev->missing) {
fs_devices->missing_devices--; fs_devices->missing_devices--;
fs_devices->rw_devices++; if (!fs_devices->seeding)
fs_devices->rw_devices++;
} }
if (srcdev->can_discard) if (srcdev->can_discard)
fs_devices->num_can_discard--; fs_devices->num_can_discard--;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册