Re: [PATCH 5/9] FIX: Unfreeze array on success only during reshape continuation

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

 



On Wed, 09 Mar 2011 14:46:10 +0100 Adam Kwolek <adam.kwolek@xxxxxxxxx> wrote:

> When reshape continuation fails, reshaped array should remain frozen
> to allow user for repair action (mdmon will not change array state).
> Setting restart to 0 was moved down to allow failure detection.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
> ---
> 
>  Grow.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Grow.c b/Grow.c
> index e37fc57..67bbb26 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -2255,11 +2255,12 @@ int reshape_container(char *container, char *devname,
>  				   content, force,
>  				   backup_file, quiet, 1, restart);
>  		close(fd);
> -		restart = 0;
>  		if (rv)
>  			break;
> +		restart = 0;
>  	}
> -	unfreeze(st);
> +	if (restart == 0)
> +		unfreeze(st);
>  	sysfs_free(cc);
>  	exit(0);
>  }
> 

Not applied... it is probably close to right, but I'm a little confused.
Surely we should never never unfreeze on an error - not only in the restart
case...
And the code doesn't make it obvious that the unfreeze is only in the
error case...
Maybe
  if (!rv)
     unfreeze(st);
??

NeilBrown
--
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


[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