As we do per-chunk missing device number check at read_one_chunk() time,
it's not needed to do global missing device number check.

Just remove it.

Now btrfs can handle the following case:
 # mkfs.btrfs -f -m raid1 -d single /dev/sdb /dev/sdc

 Data chunk will be located in sdb, so we should be safe to wipe sdc
 # wipefs -a /dev/sdc

 # mount /dev/sdb /mnt/btrfs -o degraded

Signed-off-by: Qu Wenruo <[email protected]>
---
 fs/btrfs/disk-io.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0b658d0..ac640ea 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2947,14 +2947,6 @@ retry_root_backup:
        }
        fs_info->num_tolerated_disk_barrier_failures =
                btrfs_calc_num_tolerated_disk_barrier_failures(fs_info);
-       if (fs_info->fs_devices->missing_devices >
-            fs_info->num_tolerated_disk_barrier_failures &&
-           !(sb->s_flags & MS_RDONLY)) {
-               pr_warn("BTRFS: missing devices(%llu) exceeds the limit(%d), 
writeable mount is not allowed\n",
-                       fs_info->fs_devices->missing_devices,
-                       fs_info->num_tolerated_disk_barrier_failures);
-               goto fail_sysfs;
-       }
 
        fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root,
                                               "btrfs-cleaner");
-- 
2.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to