Ilya Dryomov
2013-Jul-10 11:54 UTC
[PATCH] Btrfs: num_tolerated_disk_barrier_failures is incorrect for RAID6
Currently num_tolerated_disk_barrier_failures gets the value of fs_devices->num_devices in the RAID6 case. But, RAID6 can tolerate only two simultaneous failures, so set it to 2. CC: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> --- fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index b8b60b6..aecf788 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3258,7 +3258,7 @@ int btrfs_calc_num_tolerated_disk_barrier_failures( BTRFS_BLOCK_GROUP_RAID10)) { num_tolerated_disk_barrier_failures = 1; } else if (flags & - BTRFS_BLOCK_GROUP_RAID5) { + BTRFS_BLOCK_GROUP_RAID6) { num_tolerated_disk_barrier_failures = 2; } } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Stefan Behrens
2013-Jul-10 12:23 UTC
Re: [PATCH] Btrfs: num_tolerated_disk_barrier_failures is incorrect for RAID6
On Wed, 10 Jul 2013 14:54:30 +0300, Ilya Dryomov wrote:> Currently num_tolerated_disk_barrier_failures gets the value of > fs_devices->num_devices in the RAID6 case. But, RAID6 can tolerate only > two simultaneous failures, so set it to 2. > > CC: Stefan Behrens <sbehrens@giantdisaster.de> > Signed-off-by: Ilya Dryomov <idryomov@gmail.com> > --- > fs/btrfs/disk-io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c > index b8b60b6..aecf788 100644 > --- a/fs/btrfs/disk-io.c > +++ b/fs/btrfs/disk-io.c > @@ -3258,7 +3258,7 @@ int btrfs_calc_num_tolerated_disk_barrier_failures( > BTRFS_BLOCK_GROUP_RAID10)) { > num_tolerated_disk_barrier_failures = 1; > } else if (flags & > - BTRFS_BLOCK_GROUP_RAID5) { > + BTRFS_BLOCK_GROUP_RAID6) { > num_tolerated_disk_barrier_failures = 2; > } > } >ELATE :), Henrik Nordvik already fixed it with commit 15b0a89d7. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html