All of lore.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 1/3] libnsm.a: sm-notify sometimes ignores monitored hosts
Date: Mon, 13 Dec 2010 14:32:17 -0500	[thread overview]
Message-ID: <4D0674C1.7060309@RedHat.com> (raw)
In-Reply-To: <F3286C05-D9DC-4EF7-A852-F55AC49185B9@oracle.com>

Hey...

On 12/13/2010 12:08 PM, Chuck Lever wrote:

>>>  */
>>> @@ -863,10 +879,15 @@ nsm_load_host(const char *directory, const char *filename, nsm_populate_t func)
>>> 	if (path == NULL)
>>> 		goto out_err;
>>>
>>> -	if (stat(path, &stb) == -1) {
>>> +	if (lstat(path, &stb) == -1) {
>>> 		xlog(L_ERROR, "Failed to stat %s: %m", path);
>>> 		goto out_freepath;
>>> 	}
>>> +	if (!S_ISREG(stb.st_mode)) {
>>> +		xlog(D_GENERAL, "Skipping non-regular file %s",
>>> +				path);
>> Question, why do we care non-regular files are being ignored?
> 
> We probably want to report anything unexpected in 
> the /var/lib/nfs/statd/sm{,.bak} directories.
> 
>> I understand logging the lstat() error but logging statements like
>> "ignoring this" or "not doing that" just make the debug output a 
>> bit too noisy IMHO... 
> 
> My expectation is that under normal circumstances this message 
> would never fire.  
Correct the only way they will be shown is with the "-F -d" flags... 

> statd shouldn't put anything in that directory 
> that isn't a regular file.  If there's something else in there, 
> we should report it.  Also, if statd (or something else) is broken 
> and the code thinks the object isn't a regular file, then this 
> message would point to what is wrong.
To put this in context, here are the message that come up with
the patch applied... I added a symlink to /var/lib/nfs/statd/sm/statd
to generate both messages... 

statd: Version 1.2.3 starting
statd: Flags: No-Daemon Log-STDERR TI-RPC 
sm-notify: Version 1.2.3 starting
sm-notify: Already notifying clients; Exiting!
statd: Skipping dot file ..
statd: Skipping non-regular file /var/lib/nfs/statd/sm/statd
statd: Skipping dot file .

I think we both agree the "Skipping dot file" simply not
needed... The "Skipping non-regular" message... well I have 
to say it really does not have much meaning... either.. IMHO...

But I do agree, it probably will *never* seen... 

steved.


  reply	other threads:[~2010-12-13 19:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06 16:09 [PATCH 0/3] IPv6-related nfs-utils bugs and regressions Chuck Lever
2010-12-06 16:09 ` [PATCH 1/3] libnsm.a: sm-notify sometimes ignores monitored hosts Chuck Lever
2010-12-13 16:54   ` Steve Dickson
2010-12-13 17:08     ` Chuck Lever
2010-12-13 19:32       ` Steve Dickson [this message]
2010-12-13 19:55         ` Steve Dickson
     [not found]   ` <20101206160944.18361.28275.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2010-12-13 19:59     ` Steve Dickson
2010-12-06 16:09 ` [PATCH 2/3] libnsm.a: Replace __attribute_noinline__ Chuck Lever
     [not found]   ` <20101206160953.18361.21885.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2010-12-13 19:59     ` Steve Dickson
2010-12-06 16:10 ` [PATCH 3/3] sm-notify: Make use of AI_NUMERICSERV conditional Chuck Lever
     [not found]   ` <20101206161002.18361.24632.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2010-12-13 20:00     ` 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=4D0674C1.7060309@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.