Re: [PATCH] DM RAID: Explicitly turn off bad block support

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

 



On Mon, 22 Apr 2013 11:29:48 -0500 Brassow Jonathan <jbrassow@xxxxxxxxxx>
wrote:

> 
> On Apr 21, 2013, at 7:52 PM, NeilBrown wrote:
> 
> > On Fri, 19 Apr 2013 08:30:24 -0500 Jonathan Brassow <jbrassow@xxxxxxxxxx>
> > wrote:
> > 
> >> DM RAID:  Explicitly turn off bad block support
> >> 
> >> DM RAID does not currently use the bad block tracking available in
> >> MD.  'badblocks.shift' must be set to '-1' in order to explicitly
> >> tell MD not to perform bad block related functions, like
> >> narrow_write_error().
> >> 
> >> Signed-off-by: Jonathan Brassow <jbrassow@xxxxxxxxxx>
> >> 
> >> Index: linux-upstream/drivers/md/dm-raid.c
> >> ===================================================================
> >> --- linux-upstream.orig/drivers/md/dm-raid.c
> >> +++ linux-upstream/drivers/md/dm-raid.c
> >> @@ -170,8 +170,10 @@ static struct raid_set *context_alloc(st
> >> 	rs->md.delta_disks = 0;
> >> 	rs->md.recovery_cp = 0;
> >> 
> >> -	for (i = 0; i < raid_devs; i++)
> >> +	for (i = 0; i < raid_devs; i++) {
> >> 		md_rdev_init(&rs->dev[i].rdev);
> >> +		rs->dev[i].rdev.badblocks.shift = -1; /* No bad block support */
> >> +	}
> >> 
> >> 	/*
> >> 	 * Remaining items to be initialized by further RAID params:
> >> 
> > 
> > Thanks, but I don't think this is the right fix.
> > md_rdev_init really should set shift to -1, because we can only support
> > badblocks if the metadata explicitly supports it.
> > 
> > What do you think of this instead?
> 
> I like it much better.  It means that the proper initialization is done centrally, rather than expecting every super block type to know enough to turn off things they may not know about.  I considered this, but went along with the idea that it was the responsibility of the individual superblock handlers.
> 

:-)

Does this need to go to -stable?  Which versions, do you know?

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[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