From: Mike Christie <mchristi@redhat.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH] tcmu: wait for nl reply only if there are listeners
Date: Tue, 05 Feb 2019 17:46:19 +0000 [thread overview]
Message-ID: <5C59CBEB.7090803@redhat.com> (raw)
In-Reply-To: <1549076481-15420-1-git-send-email-mchristi@redhat.com>
Martin, I am self nacking this patch for now.
On 02/01/2019 09:01 PM, Mike Christie wrote:
> genlmsg_multicast_allns used to return -ESRCH even if the message was
> successfully sent to a listener. With commit:
>
> commit cb9f7a9a5c96a773bbc9c70660dc600cfff82f82
> Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Date: Tue Feb 6 14:48:32 2018 +0100
>
> netlink: ensure to loop over all netns in genlmsg_multicast_allns()
>
> it now will return success if the message was sent to a listener. With
> that patch, tcmu can now immediately fail if -ESRCH is returned because
> we know there will be no reply.
>
> Signed-off-by: Mike Christie <mchristi@redhat.com>
>
> ---
> drivers/target/target_core_user.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
> index 5831e0e..dccc13c 100644
> --- a/drivers/target/target_core_user.c
> +++ b/drivers/target/target_core_user.c
> @@ -1794,9 +1794,6 @@ static int tcmu_netlink_event_send(struct tcmu_dev *udev,
>
> ret = genlmsg_multicast_allns(&tcmu_genl_family, skb, 0,
> TCMU_MCGRP_CONFIG, GFP_KERNEL);
> - /* We don't care if no one is listening */
> - if (ret = -ESRCH)
> - ret = 0;
> if (!ret)
> ret = tcmu_wait_genl_cmd_reply(udev);
> return ret;
>
next prev parent reply other threads:[~2019-02-05 17:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 3:01 [PATCH] tcmu: wait for nl reply only if there are listeners Mike Christie
2019-02-05 17:46 ` Mike Christie [this message]
2019-02-28 19:28 ` [PATCH] tcmu: wait for nl reply only if there are listeners or during an add Cathy Avery
2019-03-01 21:17 ` Mike Christie
2019-03-06 17:37 ` Martin K. Petersen
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=5C59CBEB.7090803@redhat.com \
--to=mchristi@redhat.com \
--cc=target-devel@vger.kernel.org \
/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