diff options
author | NeilBrown <neilb@suse.de> | 2009-09-25 09:23:33 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-09-25 09:23:33 +0200 |
commit | e38cc2d87b319572fe7ff08be5657f563b1ef9e7 (patch) | |
tree | ffbefda368a7c13a584bedc083cf272a2a679dd8 /restripe.c | |
parent | mdadm.8 : update documentation for new --grow modes (diff) | |
download | mdadm-e38cc2d87b319572fe7ff08be5657f563b1ef9e7.tar.xz mdadm-e38cc2d87b319572fe7ff08be5657f563b1ef9e7.zip |
Fix raid6 error recovery in 'restripe' code.
Thanks to Matthias Urlichs for discovering and reporting this.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'restripe.c')
-rw-r--r-- | restripe.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -477,8 +477,8 @@ int save_stripes(int *source, unsigned long long *offsets, for (i = 0; i < data_disks; i++) bufs[i] = (uint8_t*)buf + chunk_size * ((qdisk+1+i) % raid_disks); - fdisk[0] = (qdisk + 1 + fdisk[0]) * raid_disks; - fdisk[1] = (qdisk + 1 + fdisk[1]) * raid_disks; + fdisk[0] = (qdisk + 1 + fdisk[0]) % raid_disks; + fdisk[1] = (qdisk + 1 + fdisk[1]) % raid_disks; syndrome_disks = data_disks; } bufs[syndrome_disks] = (uint8_t*)buf + chunk_size * disk; |