]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
raid6check.c: fix Q parity generation
authorPiergiorgio Sartor <piergiorgio.sartor@nexgo.de>
Sat, 1 Feb 2014 21:16:52 +0000 (22:16 +0100)
committerNeilBrown <neilb@suse.de>
Tue, 4 Feb 2014 05:06:46 +0000 (16:06 +1100)
In the transition to 4K page processing,
the Q parity generation had a wrong offset
in the buffer.
This patche fix this.

Signed off: piergiorgio.sartor@nexgo.de

Signed-off-by: NeilBrown <neilb@suse.de>
raid6check.c

index 042f7d077b4cd725824e6dfc8fcf40cbcc1affaa..48e9094a2f7b5e736d52a52b1d26ff80b4f1f1ad 100644 (file)
@@ -354,7 +354,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
                                        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]];