From: Martin Wilck <mwilck@suse.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>,
Chongyun Wu <wu.chongyun@h3c.com>
Cc: Martin Wilck <mwilck@suse.com>, dm-devel@redhat.com
Subject: [PATCH RESEND 4/4] libmultipath: uev_update_path: update path properties
Date: Thu, 8 Mar 2018 00:21:52 +0100 [thread overview]
Message-ID: <20180307232152.15538-5-mwilck@suse.com> (raw)
In-Reply-To: <20180307232152.15538-1-mwilck@suse.com>
Update pp->udev and those path attributes that can be cheaply
updated from sysfs, i.e. without IO to the disk.
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
multipathd/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/multipathd/main.c b/multipathd/main.c
index e9668205ce92..6e6c52a52783 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -964,6 +964,14 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
strcpy(pp->wwid, wwid);
else
pp->wwid_changed = 0;
+ } else {
+ udev_device_unref(pp->udev);
+ pp->udev = udev_device_ref(uev->udev);
+ conf = get_multipath_config();
+ if (pathinfo(pp, conf, DI_SYSFS|DI_NOIO) != PATHINFO_OK)
+ condlog(1, "%s: pathinfo failed after change uevent",
+ uev->kernel);
+ put_multipath_config(conf);
}
if (pp->initialized == INIT_REQUESTED_UDEV)
--
2.16.1
next prev parent reply other threads:[~2018-03-07 23:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 23:21 [PATCH RESEND 0/4] multipath-tools: fixes for path wwid detection and path change uevents Martin Wilck
2018-03-07 23:21 ` [PATCH RESEND 1/4] libmultipath: get_uid: check VPD pages for SCSI only Martin Wilck
2018-03-07 23:21 ` [PATCH RESEND 2/4] libmultipath: get_uid: don't quit prematurely without udev Martin Wilck
2018-03-07 23:21 ` [PATCH RESEND 3/4] libmultipath: uev_update_path: always warn if WWID changed Martin Wilck
2018-03-07 23:21 ` Martin Wilck [this message]
2018-03-14 17:40 ` [PATCH RESEND 0/4] multipath-tools: fixes for path wwid detection and path change uevents Benjamin Marzinski
2018-10-02 21:02 ` Martin Wilck
2018-10-05 23:07 ` Benjamin Marzinski
2018-10-08 8:26 ` Martin Wilck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180307232152.15538-5-mwilck@suse.com \
--to=mwilck@suse.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
--cc=wu.chongyun@h3c.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox