The logic here is wrong. if fullsync is 0, it WILL BUG. Signed-off-by: Neil Brown <neilb@xxxxxxxxxxxxxxx> ### Diffstat output ./drivers/md/raid1.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff ./drivers/md/raid1.c~current~ ./drivers/md/raid1.c --- ./drivers/md/raid1.c~current~ 2005-03-22 17:11:00.000000000 +1100 +++ ./drivers/md/raid1.c 2005-03-22 17:24:57.000000000 +1100 @@ -1243,13 +1243,16 @@ static sector_t sync_request(mddev_t *md len = (max_sector - sector_nr) << 9; if (len == 0) break; - if (!conf->fullsync && sync_blocks == 0) - if (!bitmap_start_sync(mddev->bitmap, - sector_nr, &sync_blocks)) - break; - if (sync_blocks < (PAGE_SIZE>>9)) - BUG(); - if (len > (sync_blocks<<9)) len = sync_blocks<<9; + if (!conf->fullsync) { + if (sync_blocks == 0) { + if (!bitmap_start_sync(mddev->bitmap, + sector_nr, &sync_blocks)) + break; + if (sync_blocks < (PAGE_SIZE>>9)) + BUG(); + if (len > (sync_blocks<<9)) len = sync_blocks<<9; + } + } for (i=0 ; i < conf->raid_disks; i++) { bio = r1_bio->bios[i]; - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html