dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [dm-devel] [PATCH] libmultipath: avoid buffer size warning with systemd 240+
@ 2021-08-12 10:45 mwilck
  2021-08-30 21:31 ` Benjamin Marzinski
  0 siblings, 1 reply; 2+ messages in thread
From: mwilck @ 2021-08-12 10:45 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

Since systemd commit e39b4d2 ("libudev: re-implement udev-monitor by
sd_device_monitor"), udev_monitor_set_receive_buffer_size() returns 1
on success. Fix the test for the return value to avoid a misleading
"failed to increase buffer size" warning.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/uevent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
index d3061bf..4265904 100644
--- a/libmultipath/uevent.c
+++ b/libmultipath/uevent.c
@@ -569,7 +569,7 @@ 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))
+	if (udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024) < 0)
 		condlog(2, "failed to increase buffer size");
 #endif
 	fd = udev_monitor_get_fd(monitor);
-- 
2.32.0


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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [dm-devel] [PATCH] libmultipath: avoid buffer size warning with systemd 240+
  2021-08-12 10:45 [dm-devel] [PATCH] libmultipath: avoid buffer size warning with systemd 240+ mwilck
@ 2021-08-30 21:31 ` Benjamin Marzinski
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Marzinski @ 2021-08-30 21:31 UTC (permalink / raw)
  To: mwilck; +Cc: dm-devel

On Thu, Aug 12, 2021 at 12:45:15PM +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> Since systemd commit e39b4d2 ("libudev: re-implement udev-monitor by
> sd_device_monitor"), udev_monitor_set_receive_buffer_size() returns 1
> on success. Fix the test for the return value to avoid a misleading
> "failed to increase buffer size" warning.
> 
> Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
>  libmultipath/uevent.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
> index d3061bf..4265904 100644
> --- a/libmultipath/uevent.c
> +++ b/libmultipath/uevent.c
> @@ -569,7 +569,7 @@ 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))
> +	if (udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024) < 0)
>  		condlog(2, "failed to increase buffer size");
>  #endif
>  	fd = udev_monitor_get_fd(monitor);
> -- 
> 2.32.0

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-30 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 10:45 [dm-devel] [PATCH] libmultipath: avoid buffer size warning with systemd 240+ mwilck
2021-08-30 21:31 ` Benjamin Marzinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).