Skip to contentSkip to conversation

multipathd: modify error handling for monitor buffer resizing

PATCH New Joe Slater 1 participant 1 message Oct 22, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Joe Slater

author
#1 lore raw

PATCH 1/1 multipathd: modify error handling for monitor buffer resizing

-----Original Message-----
From: Joe Slater <[email protected]>
Sent: Thursday, October 22, 2020 1:46 PM
To: Slater, Joseph <[email protected]>
Cc: MacLeod, Randy <[email protected]>
Subject: [meta-oe][PATCH 1/1] multipathd: modify error handling for monitor buffer resizing

udev_monitor_set_receive_buffer_size() will return a negative value if not successful. The assumption that it will return 0 for success is incorrect.

---
 .../files/0001-recbuf-resize.patch            | 24 +++++++++++++++++++
 .../multipath-tools/multipath-tools_0.8.4.bb  |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-oe/recipes-support/multipath-tools/files/0001-recbuf-resize.patch
meta-oe/recipes-support/multipath-tools/files/0001-recbuf-resize.p new file +0 -0
new file mode 100644
index 000000000..5e073c4af

+++ atch
@@ -0,0 +1,24 @@
+multipathd: modify error handling for monitor buffer resizing +
+udev_monitor_set_receive_buffer_size() will return a negative value if +not successful. We do not generate a warning message if the failure is +due to not having permission to override kernel size limits. +
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <[email protected]>
+
+
+--- a/libmultipath/uevent.c
++++ b/libmultipath/uevent.c
+@@ -810,7 +810,8 @@ int uevent_listen(struct udev *udev)
+ }
+ pthread_cleanup_push(monitor_cleanup, monitor); #ifdef
+LIBUDEV_API_RECVBUF
+- if (udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024))
++ err = udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024);
++ if (err < 0 && err != -EACCES && err != -EPERM)
+ condlog(2, "failed to increase buffer size"); #endif
+ fd = udev_monitor_get_fd(monitor);

meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb +1 -0
index 331c0cd01..08b2ce87f 100644
@@ -47,6 +47,7 @@ SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
            file://0001-fix-bug-of-do_compile-and-do_install.patch \
            file://0001-add-explicit-dependency-on-libraries.patch \
            file://0001-fix-boolean-value-with-json-c-0.14.patch \
+           file://0001-recbuf-resize.patch \
            "
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"

--
2.17.1