--- linux-2.5/drivers/md/raid6main.c.orig 2004-01-09 18:29:00.000000000 -0800 +++ linux-2.5/drivers/md/raid6main.c 2004-01-18 23:04:04.000000000 -0800 @@ -1557,7 +1557,14 @@ first_sector = raid6_compute_sector(stripe*data_disks*sectors_per_chunk + chunk_offset, raid_disks, data_disks, &dd_idx, &pd_idx, conf); - sh = get_active_stripe(conf, sector_nr, pd_idx, 0); + sh = get_active_stripe(conf, sector_nr, pd_idx, 1); + if (sh == NULL) { + sh = get_active_stripe(conf, sector_nr, pd_idx, 0); + /* make sure we don't swamp the stripe cache if someone else + * is trying to get access + */ + yield(); + } spin_lock(&sh->lock); set_bit(STRIPE_SYNCING, &sh->state); clear_bit(STRIPE_INSYNC, &sh->state);