case 500 + ALGORITHM_PARITY_0:
return block + 1;
-
case 600 + ALGORITHM_PARITY_N_6:
if (block == -2)
return raid_disks - 1;
return raid_disks - 1;
return block + 1;
-
case 600 + ALGORITHM_PARITY_0:
if (block == -1)
return 0;
if (block == -2) return (pd+1) % raid_disks;
return (pd + 2 + block) % raid_disks;
-
case 600 + ALGORITHM_ROTATING_N_RESTART:
/* Same a left_asymmetric, by first stripe is
* D D D P Q rather than
}
}
-
void xor_blocks(char *target, char **sources, int disks, int size)
{
int i, j;
}
}
-
/*
* The following was taken from linux/drivers/md/mktables.c, and modified
* to create in-memory tables rather than C code
if((Px != 0) && (Qx == 0))
curr_broken_disk = diskP;
-
if((Px == 0) && (Qx != 0))
curr_broken_disk = diskQ;
-
if((Px != 0) && (Qx != 0)) {
data_id = (raid6_gflog[Qx] - raid6_gflog[Px]);
if(data_id < 0) data_id += 255;
syndrome_disks = data_disks;
}
qsyndrome((uint8_t*)stripes[disk],
- (uint8_t*)stripes[qdisk],
+ (uint8_t*)stripes[qdisk],
(uint8_t**)blocks,
syndrome_disks, chunk_size);
break;
*p++ = '\0';
offsets[i] = atoll(p) * 512;
}
-
+
fds[i] = open(argv[9+i], O_RDWR);
if (fds[i] < 0) {
perror(argv[9+i]);