All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libmultipath: fix flush_on_last_del config handlers
@ 2012-12-21 19:11 Guangyu Sun
  2012-12-22  8:43 ` Christophe Varoqui
  0 siblings, 1 reply; 2+ messages in thread
From: Guangyu Sun @ 2012-12-21 19:11 UTC (permalink / raw)
  To: dm-devel

From: Guangyu Sun <guangyu.sun@oracle.com>

Now flush_on_last_del cannot be set to FLUSH_DISABLED if its default
value is FLUSH_ENABLED. This patch fixes the issue.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
---
  libmultipath/dict.c |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index e0535a6..ebc49a3 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -508,7 +508,7 @@ def_flush_on_last_del_handler(vector strvec)
  	if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "0") == 0))
  		conf->flush_on_last_del = FLUSH_DISABLED;
-	if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+	else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "1") == 0))
  		conf->flush_on_last_del = FLUSH_ENABLED;
  	else
@@ -1214,7 +1214,7 @@ hw_flush_on_last_del_handler(vector strvec)
  	if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "0") == 0))
  		hwe->flush_on_last_del = FLUSH_DISABLED;
-	if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+	else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "1") == 0))
  		hwe->flush_on_last_del = FLUSH_ENABLED;
  	else
@@ -1609,7 +1609,7 @@ mp_flush_on_last_del_handler(vector strvec)
  	if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "0") == 0))
  		mpe->flush_on_last_del = FLUSH_DISABLED;
-	if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+	else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "1") == 0))
  		mpe->flush_on_last_del = FLUSH_ENABLED;
  	else
-- 1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] libmultipath: fix flush_on_last_del config handlers
  2012-12-21 19:11 [PATCH] libmultipath: fix flush_on_last_del config handlers Guangyu Sun
@ 2012-12-22  8:43 ` Christophe Varoqui
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe Varoqui @ 2012-12-22  8:43 UTC (permalink / raw)
  To: device-mapper development

On ven., 2012-12-21 at 11:11 -0800, Guangyu Sun wrote:
> Now flush_on_last_del cannot be set to FLUSH_DISABLED if its default
> value is FLUSH_ENABLED. This patch fixes the issue.

Good catch. Applied.

Thanks,
Christophe Varoqui,
http://www.opensvc.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-22  8:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21 19:11 [PATCH] libmultipath: fix flush_on_last_del config handlers Guangyu Sun
2012-12-22  8:43 ` Christophe Varoqui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.