linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: num_tolerated_disk_barrier_failures is incorrect for RAID6
@ 2013-07-10 11:54 Ilya Dryomov
  2013-07-10 12:23 ` Stefan Behrens
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Dryomov @ 2013-07-10 11:54 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Chris Mason, idryomov, Stefan Behrens

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-10 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10 11:54 [PATCH] Btrfs: num_tolerated_disk_barrier_failures is incorrect for RAID6 Ilya Dryomov
2013-07-10 12:23 ` Stefan Behrens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).