[dm-devel] [PATCH 7/7] multipathd: ignore uevents for non-mpath devices

Martin Wilck mwilck at suse.com
Mon Jan 29 23:44:05 UTC 2018


On Mon, 2018-01-29 at 14:25 -0800, Ritika Srivastava wrote:
> On 01/16/2018 11:49 PM, Martin Wilck wrote:
> > multipathd can't deal with other devices anyway. Proceeding further
> > with events for other devices just generates log noise.
> > 
> > Based on an idea from Ritika Srivastava <ritika.srivastava at oracle.c
> > om>.
> > ("multipath-tools: Skip CHANGE uevent for non-mpath devices").
> > 
> > Signed-off-by: Martin Wilck <mwilck at suse.com>
> > ---
> >   multipathd/main.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/multipathd/main.c b/multipathd/main.c
> > index ff3ecb640487..26632291657f 100644
> > --- a/multipathd/main.c
> > +++ b/multipathd/main.c
> > @@ -1121,7 +1121,7 @@ uev_trigger (struct uevent * uev, void *
> > trigger_data)
> >   	 * Add events are ignored here as the tables
> >   	 * are not fully initialised then.
> >   	 */
> > -	if (!strncmp(uev->kernel, "dm-", 3)) {
> > +	if (!strncmp(uev->kernel, "dm-", 3) &&
> > uevent_is_mpath(uev)) {
> >   		if (!strncmp(uev->action, "change", 6)) {
> >   			r = uev_add_map(uev, vecs);
> >   
> 
> Hi Martin,
> Thank you for the updated patch.
> With this patch, the error "uevent trigger error" would not be 
> encountered when removing lvm snapshots.
> 
> However, when the uevent is for a 'dm' device but not for a
> multipath 
> device, then should we just return from this check in uev_trigger()?
> With this patch, uev_update_path()/uev_remove_path() would still be 
> called which would generate further log.
> Should we avoid these function calls too?

You are right, thanks for pointing that out. I'll post an update.

Martin


-- 
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list