[dm-devel] [PATCH] multipathd: revert mpp size update if map update fails

Christophe Varoqui christophe.varoqui at opensvc.com
Fri Oct 25 05:44:26 UTC 2013


Oh yes. Applied.
Thanks.


On Fri, Oct 25, 2013 at 2:50 AM, <michaelc at cs.wisc.edu> wrote:

> From: Mike Christie <michaelc at cs.wisc.edu>
>
> If updating the dm device in the kernel fails we cannot leave
> the mpp size updated, because if we correct the problem and
> try to resize later multipathd prevents resizing the device
> of the size has not changed.
>
> I hit this when all paths to a dm-multipath device where not
> yet updated but multipathd resize was run.
>
> Signed-off-by: Mike Christie <michaelc at cs.wisc.edu>
> ---
>  multipathd/cli_handlers.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
> index 4b860bb..58a5643 100644
> --- a/multipathd/cli_handlers.c
> +++ b/multipathd/cli_handlers.c
> @@ -567,6 +567,7 @@ int resize_map(struct multipath *mpp, unsigned long
> long size,
>                struct vectors * vecs)
>  {
>         char params[PARAMS_SIZE] = {0};
> +       unsigned long long orig_size = mpp->size;
>
>         mpp->size = size;
>         update_mpp_paths(mpp, vecs->pathvec);
> @@ -575,6 +576,7 @@ int resize_map(struct multipath *mpp, unsigned long
> long size,
>         if (domap(mpp, params) <= 0) {
>                 condlog(0, "%s: failed to resize map : %s", mpp->alias,
>                         strerror(errno));
> +               mpp->size = orig_size;
>                 return 1;
>         }
>         return 0;
> --
> 1.7.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20131025/65d2bdf9/attachment.htm>


More information about the dm-devel mailing list