From b2efedca68c15bc6eab6cbe0756f90c3b8f23b8f Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Wed, 13 Aug 2014 14:24:24 +0800 Subject: [PATCH] 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: Anand Jain Signed-off-by: Chris Mason --- fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 94a0d186de4..8482396056e 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1832,7 +1832,8 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info, fs_devices->num_devices--; if (srcdev->missing) { fs_devices->missing_devices--; - fs_devices->rw_devices++; + if (!fs_devices->seeding) + fs_devices->rw_devices++; } if (srcdev->can_discard) fs_devices->num_can_discard--; -- 2.46.0