[PATCH] multipathd: update path's udev in uev_update_path

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

 



Hi Martin and Ben,
Could you help to review this patch, thanks.

When receiving a change uevent and calling uev_update_path, current code
not update the path's udev, if use pp->udev to query the udev database
info will get the old data. So it should update the path's udev with the
new udev from the new uevent in uev_update_path also.

Signed-off-by: Chongyun Wu <wu.chongyun@xxxxxxx>
---
 multipathd/main.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/multipathd/main.c b/multipathd/main.c
index 27cf234..e7a4f4b 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -937,6 +937,9 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
 	if (pp) {
 		struct multipath *mpp = pp->mpp;
 
+		udev_device_unref(pp->udev);
+		pp->udev = udev_device_ref(uev->udev);
+
 		if (disable_changed_wwids &&
 		    (strlen(pp->wwid) || pp->wwid_changed)) {
 			char wwid[WWID_SIZE];
-- 
1.7.9.5

Regards
Chongyun

--
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