From f4c1e288b2d52ee38df5ed5f10ae5d34c462a655 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 18 Sep 2013 23:06:07 +0200 Subject: [PATCH] Removes the specific recovering functions. We now always use the generic ones. --- raid.c | 261 ++++++++++++++----------------------- raid.h | 44 +------ selftest.c | 368 +++-------------------------------------------------- 3 files changed, 122 insertions(+), 551 deletions(-) diff --git a/raid.c b/raid.c index bd470a85..e584d61e 100644 --- a/raid.c +++ b/raid.c @@ -1232,8 +1232,8 @@ void raid_gen(unsigned level, unsigned char** buffer, unsigned diskmax, unsigned * This method is also the same used by ZFS to implement its RAIDTP * support. * - * Note that the same extension is not possible for Quad Parity because - * in the approach used in the paper we don't have the guarantee to always have + * To support RAIDQP (Quad Parity) we go futher using also the parity generator "8". + * Note that in this case we don't have the guarantee to always have * a system of independent linear equations, and for Quad Parity in some cases * the system is not solvable. * @@ -1258,18 +1258,18 @@ void raid_gen(unsigned level, unsigned char** buffer, unsigned diskmax, unsigned * Q = sum(2^i * Di) 0<=i RAID_QUAD_DATA_LIMIT && COMBO3[n].use[2] >= 3) + continue; + /* save */ a = buffer[i]; b = buffer[j]; @@ -520,7 +195,7 @@ static void raidQPtest(unsigned diskmax, unsigned block_size) || memcmp(buffer_test1, b, block_size) != 0 || memcmp(buffer_test2, c, block_size) != 0 ) { - fprintf(stderr, "Failed RAIDQP test 1\n"); + fprintf(stderr, "Failed RAID test\n"); exit(EXIT_FAILURE); } @@ -539,7 +214,7 @@ static void raidQPtest(unsigned diskmax, unsigned block_size) /* check 2data */ for(i=0;i