Re: [PATCH 02/10] Fix --update-subarray on active volume

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

 




> 2022年8月18日 22:56,Mateusz Kusiak <mateusz.kusiak@xxxxxxxxx> 写道:
> 
> Options: bitmap, ppl and name should not be updated when array is active.
> Those features are mutually exclusive and share the same data area in IMSM (danger of overwriting by kernel).
> Remove check for active subarrays from super-intel.
> Since ddf is not supported, apply it globally for all options.
> 
> Signed-off-by: Mateusz Kusiak <mateusz.kusiak@xxxxxxxxx>


Acked-by: Coly Li <colyli@xxxxxxx>

Thanks.

Coly Li


> ---
> Manage.c      | 7 +++++++
> super-intel.c | 5 -----
> 2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/Manage.c b/Manage.c
> index e5e6abe4..b9f0b184 100644
> --- a/Manage.c
> +++ b/Manage.c
> @@ -1694,6 +1694,13 @@ int Update_subarray(char *dev, char *subarray, char *update, struct mddev_ident
> 		goto free_super;
> 	}
> 
> +	if (is_subarray_active(subarray, st->devnm)) {
> +		if (verbose >= 0)
> +			pr_err("Subarray %s in %s is active, cannot update %s\n",
> +			       subarray, dev, update);
> +		goto free_super;
> +	}
> +
> 	if (mdmon_running(st->devnm))
> 		st->update_tail = &st->updates;
> 
> diff --git a/super-intel.c b/super-intel.c
> index 4ddfcf94..672f946e 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -7914,11 +7914,6 @@ static int update_subarray_imsm(struct supertype *st, char *subarray,
> 		char *ep;
> 		int vol;
> 
> -		if (is_subarray_active(subarray, st->devnm)) {
> -			pr_err("Unable to update name of active subarray\n");
> -			return 2;
> -		}
> -
> 		if (!check_name(super, name, 0))
> 			return 2;
> 
> -- 
> 2.26.2
> 





[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