dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: mwilck@suse.com
Cc: dm-devel@redhat.com
Subject: Re: [dm-devel] [PATCH] libmultipath: avoid buffer size warning with systemd 240+
Date: Mon, 30 Aug 2021 16:31:07 -0500	[thread overview]
Message-ID: <20210830213107.GC3087@octiron.msp.redhat.com> (raw)
In-Reply-To: <20210812104515.28541-1-mwilck@suse.com>

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


      reply	other threads:[~2021-08-30 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20210830213107.GC3087@octiron.msp.redhat.com \
    --to=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mwilck@suse.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;
as well as URLs for NNTP newsgroup(s).