From e7804a5f8fa6d2523efac9e66f9a3e662a6ff240 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 27 Oct 2013 16:33:20 +0100 Subject: [PATCH] Reviews raid.c comments. --- raid.c | 63 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/raid.c b/raid.c index 64687dc3..26c1e8d4 100644 --- a/raid.c +++ b/raid.c @@ -16,17 +16,18 @@ */ /* - * The RAID5 and RAID6 support were originally derived from the libraid6 library - * by H. Peter Anvin released with license "GPL2 or any later version" - * used in the Linux Kernel 2.6.38. + * The RAID5 and RAID6 support were originally derived from the libraid6 + * library by H. Peter Anvin released with license "GPL2 or any later + * version", used in the Linux Kernel 2.6.38. * This support was later completely rewritten (many times), but the * H. Peter Anvin's Copyright may still apply. * - * The RAIDTP (Triple Parity), RAIDQP (Quad parity), RAIDPP (Penta Parity) and - * RAIDHP (Hexa parity) support is original work implemented from scratch. + * The RAIDTP (Triple Parity), RAIDQP (Quad parity), RAIDPP (Penta Parity) + * and RAIDHP (Hexa parity) support is original work implemented from + * scratch. * - * For RAID5 and RAID6 it works like the Linux Kernel RAID and it's based on - * the Anvin's paper "The mathematics of RAID-6" [1]. + * For RAID5 and RAID6 it works like the Linux Kernel RAID and it's based + * on the Anvin's paper "The mathematics of RAID-6" [1]. * * We compute the parity in the Galois Field GF(2^8) with the primitive * polynomial x^8 + x^4 + x^3 + x^2 + 1 (285 decimal), starting from a set @@ -35,16 +36,16 @@ * P = sum(Di) * Q = sum(2^i * Di) with 0<=i