Re: [PATCH] Assemble: update metadata information after updating

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

 



On Mon, Nov 05 2018, Gioh Kim wrote:

> getinfo_super() is called before updating metadata with update_super().
> Some information in content variable is not updated.
>
> Currently there is no problem with it. But I think it could be problematic
> at any moment.
>
> Signed-off-by: Gioh Kim <gi-oh.kim@xxxxxxxxxxxxxxxx>

This doesn't make any sense at all to me.
This is all in the c->update branch.  What the code does is:
  - load the metadata
  - update the metadata
  - save the metadata

You want to move part of "load the metadata" to after "save the
metadata".  That makes no sense.

NeilBrown


> ---
>  Assemble.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Assemble.c b/Assemble.c
> index fc0d464..9fdd4da 100644
> --- a/Assemble.c
> +++ b/Assemble.c
> @@ -618,7 +618,6 @@ static int load_devices(struct devs *devices, char *devmap,
>  				*stp = st;
>  				return -1;
>  			}
> -			tst->ss->getinfo_super(tst, content, devmap + devcnt * content->array.raid_disks);
>  
>  			memcpy(content->uuid, ident->uuid, 16);
>  			strcpy(content->name, ident->name);
> @@ -675,6 +674,8 @@ static int load_devices(struct devs *devices, char *devmap,
>  				else
>  					bitmap_done = 1;
>  			}
> +
> +			tst->ss->getinfo_super(tst, content, devmap + devcnt * content->array.raid_disks);
>  		} else {
>  			dfd = dev_open(devname,
>  				       tmpdev->disposition == 'I'
> -- 
> 2.14.1

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