linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steve French" <smfrench@gmail.com>
To: "Jamie Lokier" <jamie@shareable.org>
Cc: "Jeff Layton" <jlayton@redhat.com>,
	linux-cifs-client@lists.samba.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] cifs: remove dnotify thread code
Date: Thu, 8 Jan 2009 21:32:09 -0600	[thread overview]
Message-ID: <524f69650901081932m2912ab73x147221f721194f8@mail.gmail.com> (raw)
In-Reply-To: <20090109000708.GC12848@shareable.org>

What worries me most about losing the ability to add directory change
notification in the future (without putting the entry point back) the
lack of directory change notification is quite visible to the user
when an open directory object on the desktop (gnome or kde) does not
automatically refresh within a few seconds as files are added on the
remote system (or on another client).

The old cifs implementation was broken (partially implemented) but it
was "dead code" so was harmless (it required configuring with
CONFIG_CIFS_EXPERIMENTAL and turning on a run time flag in
/proc/fs/cifs to enable it) but it might not have been too bad to
finish the implementation.

On Thu, Jan 8, 2009 at 6:07 PM, Jamie Lokier <jamie@shareable.org> wrote:
> Steve French wrote:
>> We really need to revisit the dnotify/inotify code ... the SMB spec
>> lists what the protocol allows, but AFAIK no one has had a chance to
>> prototype this.   It is among the highest priority features still
>> needed to implement in cifs.
>>
>> As we have talked about before, dnotify (or inotify) is even more
>> useful for network file systems than local file systems (since the
>> alternative, polling, is too expensive to do over the network).   CIFS
>> and SMB2 protocols, unlike NFS, has a mechanism to handle dnotify, but
>> mapping it to the VFS has not been investigated sufficiently
>
> I think NFSv4 can do it with delegations, although the exact semantics
> an app could rely on would be different.
>
> There are several different kinds of notify that apps could use for
> different purposes: 1. Queued (an event is posted after a change, will
> eventually reach the app).  2. Coherent (the app can ask "any
> notifications for me" and if the answer is no, it can be sure that an
> attribute/data read issued prior to asking would have yielded what the
> app already cached; a sort of app cache validation).  3. Lease (the
> app is notified and must respond prior to a change being allowed to
> proceed).
>
> These form a hierarchy: if the OS/filesystem provides Lease (3), the
> app can use it in place of Coherent (2) and Queued (1).  If the
> OS/filesystem provides Lease (3) or Coherent (2), the app can use
> either in place of Queued (1).
>
> All of these have different, useful applications.  GUIs like Nautilus
> are happy with Queued (1).  For content indexers, it depends how you
> want them to behave, and how up to date they should seem.  For
> something which computes things from file contents or attributes, such
> as (possible beneficiaries) any scripting language, Make, Git, JIT
> system, or web templating system, it needs Coherent (2) notifications;
> Queued (1) is not reliable for caching.  Lease (3) is potentially
> useful for distributed databases.
>
> For CIFS/SMB it looks like all three could be implemented, in
> different ways.  I'm not sure if NFSv4 can do Queued, but I think with
> delegations it can do Coherent and Lease.
>
> For local filesystems, I think Linux provides Coherent but I haven't
> looked closely.  If not, it provides Queued.
>
> Al Viro said (long ago) apps should not rely upon timely
> dnotify/inotify events, and therefore should not use them for
> consistent app caching.  However, timely delivery isn't required,
> what's required is that reading the inotify descriptor (or reading a
> flag set by delivery of the dnotify signal / inotify SIGIO?) will
> definitely return an event if the corresponding file change has become
> observable by other means.  It is about ordering guarantees.
>
> If there is a revamp of the fsnotify code for networking especially,
> please at least have a little think about the different event delivery
> models and what apps can expect, when which semantics to support.  The
> different models are each useful, and may involve different parts of
> the networked filesystem protocol.
>
> -- Jamie
>



-- 
Thanks,

Steve

  parent reply	other threads:[~2009-01-09  3:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08 14:15 [PATCH] cifs: remove dnotify thread code Jeff Layton
2009-01-08 14:23 ` Steve French
2009-01-08 14:51   ` Jeff Layton
2009-01-09  0:07   ` Jamie Lokier
2009-01-09  1:28     ` Jeff Layton
2009-01-10  1:35       ` Jamie Lokier
2009-01-10  1:41       ` Jamie Lokier
2009-01-10 18:19         ` Steve French
2009-01-09  3:32     ` Steve French [this message]
2009-01-09 11:33       ` Jeff Layton
2009-01-09 16:18         ` Steve French
2009-01-09 18:07           ` Jeff Layton
2009-01-09 18:18       ` Al Viro

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=524f69650901081932m2912ab73x147221f721194f8@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=jamie@shareable.org \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs-client@lists.samba.org \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).