All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Phil Endecott
	<phil_bnaqb_endecott-wZDNlLIRyE5g9hUCZPvPmw@public.gmane.org>,
	Steve Dickson <SteveD@redhat.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: Make sm-notify faster if there are no servers to notify
Date: Sun, 9 Nov 2008 19:55:18 -0500	[thread overview]
Message-ID: <20081110005518.GA31166@fieldses.org> (raw)
In-Reply-To: <3EC9A304-36A0-465C-B82A-E3011CC8AD20@oracle.com>

On Sun, Nov 09, 2008 at 07:52:59PM -0500, Chuck Lever wrote:
> On Nov 9, 2008, at Nov 9, 2008, 2:25 PM, J. Bruce Fields wrote:
>> On Wed, Oct 29, 2008 at 05:11:45PM -0400, bfields wrote:
>>> On Wed, Oct 29, 2008 at 04:30:32PM -0400, Chuck Lever wrote:
>>>> I assume sync() is required because this logic performs a rename  
>>>> as well
>>>> as a simple write?
>>>
>>> I think an fsync() on the containing directory (together with an  
>>> fsync()
>>> of the file itself) would do the job if you wanted to avoid the  
>>> globaly
>>> sync().  I don't think ext3 is capable of doing anything finer- 
>>> grained
>>> than a whole-filesystem sync, though, so this doesn't help many  
>>> people
>>> in practice right now.
>>>
>>> In any case, the rename adds an extra level of safety by ensuring the
>>> nsm state is updated atomically, so we shouldn't get rid of it.
>>>
>>>>> Anyway, I think the nsm state updating shouldn't matter if you  
>>>>> don't
>>>>> even have any peers to notify.
>>>>
>>>> It probably does matter.
>>>>
>>>> When a system is initially installed, it likely does not have a  
>>>> state
>>>> file in /var/lib/nfs.  This may be harmless if it's not present;
>>>> rpc.statd probably does the right thing in this case.
>>>
>>> The "right thing" in that case would be, I guess, to create a state  
>>> file
>>> with "0" in it.  It doesn't do that.  So this patch *does* break  
>>> stuff.
>>> Oops!
>>>
>>> So should we revert it and do something else, or patch statd to  
>>> create
>>> a new state file if necessary?
>>
>> It looks like this still needs to be fixed?  I think it would be good
>> enough just to teach rpc.nfsd to create the file if it doesn't exist.
			^^^^^^^^

(Err, sorry, note I meant rpc.statd, not rpc.nfsd.)

--b.

> Meh.  I'd rather manage the state file in one place, rather than have  
> multiple user space entities fiddle with it.
>
> I think we should find out exactly what breaks when sm-notify quits  
> early.  Steve hasn't found a problem with the patch already in nfs- 
> utils, but the corner cases here are really narrow.
>
> Without a lot of testing (which we currently don't have the resources  
> for), I don't feel 100% positive about sm-notify quitting early.  My  
> preferred solution would involve working around the sync(2) call instead 
> (ie fixing sm-notify so we don't need it, or somehow doing it in the 
> background so it doesn't hold up the boot-up process).  I think we will 
> end up waiting until this actually bites someone, but chances are it will 
> be a long wait.

  reply	other threads:[~2008-11-10  0:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29  0:13 Make sm-notify faster if there are no servers to notify Phil Endecott
     [not found] ` <1225239200402-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 17:18   ` J. Bruce Fields
2008-10-29 17:30     ` Phil Endecott
     [not found]       ` <1225301403729-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 17:37         ` J. Bruce Fields
2008-10-29 17:45           ` Phil Endecott
     [not found]             ` <1225302305994-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 18:41               ` J. Bruce Fields
2008-10-29 20:30                 ` Chuck Lever
2008-10-29 21:11                   ` J. Bruce Fields
2008-11-09 19:25                     ` J. Bruce Fields
2008-11-10  0:52                       ` Chuck Lever
2008-11-10  0:55                         ` J. Bruce Fields [this message]
2008-11-10  1:00                           ` Chuck Lever
2008-11-10  9:40                         ` Phil Endecott
2008-11-10 13:41                     ` Steve Dickson
     [not found]                       ` <49183A12.7010707-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-04 21:10                         ` J. Bruce Fields
2008-12-05  3:34                           ` Neil Brown
     [not found]                             ` <18744.41310.635618.148281-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-12-05  3:58                               ` J. Bruce Fields
2008-12-05 13:26                                 ` Steve Dickson
     [not found]                                   ` <49392C14.7000709-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-05 16:38                                     ` J. Bruce Fields
2008-12-05 17:29                                       ` J. Bruce Fields
2008-12-05 18:41                                         ` Chuck Lever
2008-12-06  2:42                                           ` J. Bruce Fields
2008-12-08 19:50                                             ` Chuck Lever
2008-12-11 22:44                                               ` J. Bruce Fields
2008-12-05 19:12                                         ` Steve Dickson
     [not found]                                           ` <49397D1B.3000701-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-06  2:49                                             ` J. Bruce Fields
2008-12-05 18:42                                       ` Steve Dickson
     [not found]                                         ` <4939760A.9050304-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-06  3:08                                           ` J. Bruce Fields
2008-10-31 17:52           ` 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=20081110005518.GA31166@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=SteveD@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=phil_bnaqb_endecott-wZDNlLIRyE5g9hUCZPvPmw@public.gmane.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.