public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] sm-notify: Send fully-qualified and unqualified mon_names
Date: Fri, 19 Mar 2010 16:03:07 -0400	[thread overview]
Message-ID: <4BA3D87B.2030301@RedHat.com> (raw)
In-Reply-To: <4BA0E990.4080206@oracle.com>

Hey Chuck,

My apologizes for the delayed response... 

On 03/17/2010 10:39 AM, Chuck Lever wrote:
> On 03/17/2010 06:36 AM, Steve Dickson wrote:
>>>   /*
>>> - * Successful NOTIFY call. Server returns void, so nothing
>>> - * we need to do here.
>>> + * Successful NOTIFY call. Server returns void.
>>> + *
>>> + * Try sending another SM_NOTIFY with an unqualified "my_name"
>>> + * argument.  Reuse the port number.  If "my_name" is already
>>> + * unqualified, we're done.
>>>    */
>>>   static void
>>>   recv_notify_reply(struct nsm_host *host)
>>>   {
>>> -    xlog(D_GENERAL, "Host %s notified successfully", host->name);
>>> +    char *dot = strchr(host->my_name, '.');
>>>
>>> -    smn_forget_host(host);
>>> +    if (dot != NULL) {
>>> +        *dot = '\0';
>>> +        host->send_next = time(NULL);
>>> +        host->xid = 0;
>>> +        if (host->timeout>= NSM_MAX_TIMEOUT / 4)
>>> +            host->timeout = NSM_MAX_TIMEOUT / 4;
>>> +        insert_host(host);
>> What happens when host->my_name now resolves to host in a
>> different domain? Will this mean we now will be sending SM_NOTIFYs
>> to random hosts?
> 
>> Also, what happens when host->my_name does not resolve to anything?
>> Looking at notify(), it appears the unqualified my_name will stay
>> on the hosts list, because notify_host() will fail since the
>> smn_lookup() fails and will always set host->ai = NULL. Unless
>> I am missing something, this will cause notify() to increment
>> hp->retries and insert the hp pointer back on the host list.
>> I don't see how that cycle will broken....
> 
> host->my_name isn't used to generate the recipient's address, host->name
> is.
> 
> host->my_name is the _argument_ of an SM_NOTIFY request.  That argument
> is used as a search key by the remote, but sm-notify does not use this
> string for DNS resolution.
Ok.. I see that now... thanks...

steved.

  reply	other threads:[~2010-03-19 20:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 17:51 [PATCH 0/2] Two short fixes for sm-notify Chuck Lever
     [not found] ` <20100315174453.2586.40876.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-15 17:51   ` [PATCH 1/2] sm-notify: Use my_name when sending SM_NOTIFY requests Chuck Lever
     [not found]     ` <20100315175137.2586.71894.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-15 22:25       ` Jeff Layton
     [not found]         ` <20100315182535.2aacdadb-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-03-16  4:12           ` Chuck Lever
2010-03-16 11:20             ` Jeff Layton
2010-03-15 17:51   ` [PATCH 2/2] sm-notify: Send fully-qualified and unqualified mon_names Chuck Lever
     [not found]     ` <20100315175145.2586.1215.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-15 22:30       ` Jeff Layton
2010-03-17 10:36       ` Steve Dickson
     [not found]         ` <4BA0B0A4.6020705-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2010-03-17 14:39           ` Chuck Lever
2010-03-19 20:03             ` Steve Dickson [this message]
2010-03-17 10:53   ` [PATCH 0/2] Two short fixes for sm-notify Steve Dickson
     [not found]     ` <4BA0B48E.8030504-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2010-03-17 14:29       ` Chuck Lever
2010-03-19 20:05   ` Steve Dickson

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=4BA3D87B.2030301@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@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