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
Attachment:
signature.asc
Description: PGP signature