On Wed, 27 Jul 2011 13:09:07 +0900 Namhyung Kim <namhyung@xxxxxxxxx> wrote: > NeilBrown <neilb@xxxxxxx> writes: > > > If we have seen any write error on a drive, then don't write to > > any known-bad blocks on that drive. > > If necessary, we divide the write request up into pieces just > > like we do for reads, so each piece is either all written or > > all not written to any given drive. > > > > Signed-off-by: NeilBrown <neilb@xxxxxxx> > > Reviewed-by: Namhyung Kim <namhyung@xxxxxxxxx> > > and a nit below > > > - } else > > - r1_bio->bios[i] = NULL; > > + if (is_bad) { > > + int good_sectors = first_bad - r1_bio->sector; > > + if (good_sectors < max_sectors) > > + max_sectors = good_sectors; > > + } > > + } > > + r1_bio->bios[i] = bio; > > + targets++; > > Looks like variable 'targets' is not needed anymore. > > Thanks. I've removed it. NeilBrown -- 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