Re: [md PATCH 10/36] md/raid1: avoid writing to known-bad blocks on known-bad drives.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux