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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>.
("multipath-tools: Skip CHANGE uevent for non-mpath devices").

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
  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?
--
Thanks,
Ritika

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



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux