All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolaus Rath <Nikolaus@rath.org>
To: fuse-devel@lists.sourceforge.net,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: Difference between invalidating and deleting dentry
Date: Wed, 19 Oct 2016 14:00:49 -0700	[thread overview]
Message-ID: <8737jsqcji.fsf@thinkpad.rath.org> (raw)
In-Reply-To: <CAJfpeguX4-6N6Tb5ck9YKrzW6fXhQt6K-oHXWJYnzRuoQ9PqDQ@mail.gmail.com> (Miklos Szeredi's message of "Wed, 19 Oct 2016 10:38:49 +0200")

On Oct 19 2016, Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org> wrote:
> On Wed, Oct 19, 2016 at 10:32 AM, Amir Goldstein <amir73il-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On Wed, Oct 19, 2016 at 11:01 AM, Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org> wrote:
>>> On Wed, Oct 19, 2016 at 7:53 AM, Amir Goldstein <amir73il-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>> On Wed, Oct 19, 2016 at 4:51 AM, Nikolaus Rath <Nikolaus-BTH8mxji4b0@public.gmane.org> wrote:
>>>
>>>>> Really no one able to clarify the difference between the FUSE invalidate
>>>>> and delete dentry requests?
>>>>
>>>> It may sound strange to you, but I think the documentation is clear enough.
>>>> The difference is that in delete case, you *know* that the entry has
>>>> been deleted
>>>> and in invalidate case, you may not know what happened to the entry.
>>>> The specific use cases are implementation specific, but maybe you lost
>>>> contact with remote server or maybe the remote protocol imposes a timeout
>>>> for validity or maybe you do not have enough information
>>>> to figure out if the entry has been deleted and re-created.
>>>> Invalidate simply means that you no longer know that the entry is valid.
>>>
>>> That was the intent, yes.  However 'invalidate' + 'lookup negative'
>>> should be equivalent to 'delete'.  And it is.
>>>
>>> The reason why 'delete' was introduced by commit 451d0f599934 ("FUSE:
>>> Notifying the kernel of deletion.") is that 'invalidate' wasn't able
>>> to remove in-use subtrees.
>>>
>>> Commit bafc9b754f75 ("vfs: More precise tests in d_invalidate")
>>> changed that, so now 'notify_delete' is superfluous and AFAICS the
>>> effect of it is exactly the same as 'notify_invalidate'.
>>>
>>
>> Minus fsnotify_nameremove() for whatever it is worth.
>
> Ah, right.  But fuse lacks proper fsnotify support for remote fs
> anyway, so it's not worth much.

Thanks Miklos!

So I'll extend the documentation to say that both _invalidate() and
_delete() drop the dentry from the cache (so the next lookup attempt)
will be passed to the fuse file sysem), but that _delete() will also
inform any inotify watchers that the entry has disappeared.


Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

  reply	other threads:[~2016-10-19 21:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-09  4:37 Difference between invalidating and deleting dentry Nikolaus Rath
2016-10-10  8:16 ` [fuse-devel] " Amir Goldstein
2016-10-10 15:45   ` Nikolaus Rath
2016-10-10 15:55     ` Michael Theall
2016-10-10 15:57       ` Amir Goldstein
2016-10-10 16:11         ` Michael Theall
2016-10-10 16:10       ` Nikolaus Rath
2016-10-19  1:51         ` Nikolaus Rath
2016-10-19  5:53           ` Amir Goldstein
2016-10-19  8:01             ` Miklos Szeredi
2016-10-19  8:32               ` Amir Goldstein
2016-10-19  8:38                 ` Miklos Szeredi
2016-10-19 21:00                   ` Nikolaus Rath [this message]
2016-10-19 20:55             ` Nikolaus Rath
2016-10-31 14:36 ` John Muir
2016-11-01 20:21   ` Nikolaus Rath

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=8737jsqcji.fsf@thinkpad.rath.org \
    --to=nikolaus@rath.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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.