Re: [PATCH 2/2] FIX: Do not continue container reshape when mdmon is absent

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

 



On Thu, 03 Nov 2011 17:55:41 +0100 Adam Kwolek <adam.kwolek@xxxxxxxxx> wrote:

> When mdmon is absent metadata is not updated, and container_reshape()
> can fall in to endless loop. This can cause user data corruption.
> 
> In case when mdmon is absent do not continue container reshape process.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
> ---
> 
>  Grow.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/Grow.c b/Grow.c
> index e7fd7c4..184a973 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -2562,6 +2562,12 @@ int reshape_container(char *container, char *devname,
>  		restart = 0;
>  		if (rv)
>  			break;
> +		rv = !mdmon_running(devname2devnum(container));
> +		if (rv) {
> +			printf(Name ": Mdmon is not found. "
> +			       "Cannot continue container reshape.\n");
> +			break;
> +		}
>  	}
>  	if (!rv)
>  		unfreeze(st);
> 
> --
> 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


Applied-  thanks.

NeilBrown

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