Skip to contentSkip to conversation

raid6check.c: fix Q parity generation

PATCH New Piergiorgio Sartor 1 participant 1 message Feb 1, 2014 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 raid6check.c: fix Q parity generation

In the transition to 4K page processing,
the Q parity generation had a wrong offset
in the buffer.
This patche fix this.

Signed off: [email protected]

raid6check.c +1 -1
diff -uNrp a/raid6check.c b/raid6check.c
@@ -346,7 +346,7 @@ int check_stripes(struct mdinfo *info, i
 					blocks_page[i] = blocks[i] + j * CHECK_PAGE_SIZE;
 				}
 				if (disk[j] == diskQ) {
-					qsyndrome(p, (uint8_t*)stripes[diskQ], (uint8_t**)blocks_page, data_disks, CHECK_PAGE_SIZE);
+					qsyndrome(p, (uint8_t*)stripes[diskQ] + j * CHECK_PAGE_SIZE, (uint8_t**)blocks_page, data_disks, CHECK_PAGE_SIZE);
 				} else {
 					char *all_but_failed_blocks[data_disks];
 					int failed_block_index = block_index_for_slot[disk[j]];
Signature · 1 line
piergiorgio