diff mbox series

[09/35] multipathd: cli_del_map: fix reply for delayed action

Message ID 20210910114120.13665-10-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipathd: uxlsnr overhaul | expand

Commit Message

Martin Wilck Sept. 10, 2021, 11:40 a.m. UTC
From: Martin Wilck <mwilck@suse.com>

Return code 2 from ev_remove_map means that a delayed remove has
been started, which is not the same as failure.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/cli_handlers.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Benjamin Marzinski Sept. 15, 2021, 11:40 p.m. UTC | #1
On Fri, Sep 10, 2021 at 01:40:54PM +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> Return code 2 from ev_remove_map means that a delayed remove has
> been started, which is not the same as failure.
> 
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  multipathd/cli_handlers.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
> index 44f76ee..2e4b239 100644
> --- a/multipathd/cli_handlers.c
> +++ b/multipathd/cli_handlers.c
> @@ -783,6 +783,9 @@ cli_del_map (void * v, char ** reply, int * len, void * data)
>  		return 1;
>  	}
>  	rc = ev_remove_map(param, alias, minor, vecs);
> +	if (rc == 2)
> +		*reply = strdup("delayed");
> +
>  	FREE(alias);
>  	return rc;
>  }
> -- 
> 2.33.0

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index 44f76ee..2e4b239 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -783,6 +783,9 @@  cli_del_map (void * v, char ** reply, int * len, void * data)
 		return 1;
 	}
 	rc = ev_remove_map(param, alias, minor, vecs);
+	if (rc == 2)
+		*reply = strdup("delayed");
+
 	FREE(alias);
 	return rc;
 }