Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   Don't display the state of the newly added map during addition in the daemon and don't switch groups. (http://www.linux-archive.org/device-mapper-development/266793-dont-display-state-newly-added-map-during-addition-daemon-dont-switch-groups.html)

Hannes Reinecke 03-20-2009 10:37 AM

Don't display the state of the newly added map during addition in the daemon and don't switch groups.
 
Hi Konrad,

Konrad Rzeszutek wrote:

From: Konrad Rzeszutek <konrad@mars.virtualiron.com>

A previous commit mass-changed #ifdef DAEMON to check for 'mpp->waiter'. Unfortunatly
when the 'domap' function is called with ACT_CREATE in the daemon, the mpp->waiter is not
set, hence the multipath client mode logic is choosen. Fixing this triggers another
issues which is that newly added path via ACT_CREATE won't have their waitevent thread
created as the caller checks mpp->action (which changed to ACT_NOTHING) and won't
start the thread.


Nice. Far cleaner fix. But you forgot this:

diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index f1975fb..2d024ff 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -13,6 +13,7 @@
#include "structs.h"
#include "util.h"
#include "debug.h"
+#include "config.h"

#define WORD_SIZE 64

@@ -297,7 +298,7 @@ disassemble_map (vector pathvec, char * params, struct multi
path * mpp)
strncpy(pp->dev_t, word, BLK_DEV_SIZE);

/* Only call this in multipath client mode */
- if (!mpp->waiter && store_path(pathvec, pp))
+ if (!conf->daemon && store_path(pathvec, pp))
goto out1;
}
FREE(word);

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 10:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.