Messages in this thread Patch in this message |  | | From | Neil Brown <> | Date | Mon, 27 Nov 2000 14:41:53 +1100 (EST) | Subject | [PATCH] (test11-ac4) unbelievably silly (fatal) typo in raid5.c |
| |
Alan, raid5 rebuild has been fatally flawed ever since it got into 2.4, and my recent testing has been looking at speed more than correctness, so I didn't notice until now.
raid5_sync_request is handed a block number in 1K units and needs to convert to 512byte sector units. I could have used (block_nr*2) I could have used (block_nr<<1) but instead I used (block_nr<<2) !!!! :-(
Please apply the following patch.
Thanks, NeilBrown
--- ./drivers/md/raid5.c 2000/11/27 02:46:45 1.1 +++ ./drivers/md/raid5.c 2000/11/27 02:47:37 1.2 @@ -1516,8 +1516,8 @@ raid5_conf_t *conf = (raid5_conf_t *) mddev->private; struct stripe_head *sh; int sectors_per_chunk = conf->chunk_size >> 9; - unsigned long stripe = (block_nr<<2)/sectors_per_chunk; - int chunk_offset = (block_nr<<2) % sectors_per_chunk; + unsigned long stripe = (block_nr<<1)/sectors_per_chunk; + int chunk_offset = (block_nr<<1) % sectors_per_chunk; int dd_idx, pd_idx; unsigned long first_sector; int raid_disks = conf->raid_disks; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |