]> git.hungrycats.org Git - linux/commitdiff
btrfs: you heard me, we can't repair anything in raid56 yet
authorZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sat, 18 Jun 2016 14:46:25 +0000 (10:46 -0400)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sat, 18 Jun 2016 14:46:25 +0000 (10:46 -0400)
fs/btrfs/extent_io.c

index c1fe22c4cfbd8278285bf1be640072ad4bf8c4b6..71afeb3ed79928440c37065bdeb851eac20ffb04 100644 (file)
@@ -2018,10 +2018,10 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
        int ret;
 
        ASSERT(!(fs_info->sb->s_flags & MS_RDONLY));
-       BUG_ON(!mirror_num);
+       WARN_ON(!mirror_num);
 
        /* we can't repair anything in raid56 yet */
-       if (btrfs_is_parity_mirror(map_tree, logical, length, mirror_num))
+       if (!mirror_num || btrfs_is_parity_mirror(map_tree, logical, length, mirror_num))
                return 0;
 
        bio = btrfs_io_bio_alloc(GFP_NOFS, 1);