> -----Original Message----- > From: NeilBrown [mailto:neilb@xxxxxxx] > Sent: Monday, December 12, 2011 6:17 AM > To: Kwolek, Adam > Cc: linux-raid@xxxxxxxxxxxxxxx; Ciechanowski, Ed; Labun, Marcin; Williams, > Dan J > Subject: Re: [PATCH] imsm: FIX: Limit migration record operation by disk slot > not by index > > On Thu, 08 Dec 2011 09:46:56 +0100 Adam Kwolek > <adam.kwolek@xxxxxxxxx> wrote: > > > imsm should store migration record in to 2 first disks in array. > > This should be evaluated based on disk slots, not on disks index. > > It is not guaranteed that indexes are equal to slots. > > > > Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> > > --- > ... > > > @@ -2200,11 +2245,37 @@ static int write_imsm_migr_rec(struct > supertype *st) > > struct dl *sd; > > int len; > > struct imsm_update_general_migration_checkpoint *u; > > + struct imsm_dev *dev; > > + struct imsm_map *map = NULL; > > + > > + /* find map under migration */ > > + dev = imsm_get_device_during_migration(super); > > + /* if no migration, write buffer anyway to clear migr_record > > + * on disk based on first available device > > + */ > > + if (dev == NULL) { > > + int vol; > > + > > + if (super->current_vol >= 0) > > + vol = super->current_vol; > > + else > > + vol = 0; > > + dev = get_imsm_dev(super, super->current_vol); > > + } > > 'vol' is unused here. Should it be: > dev = get_imsm_dev(super, vol); ?? > > NeilBrown > Yes you are right, I'll sent corrected one. BR Adam -- 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