From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43225 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932360AbcJSVAx (ORCPT ); Wed, 19 Oct 2016 17:00:53 -0400 From: Nikolaus Rath To: fuse-devel@lists.sourceforge.net, linux-fsdevel , Miklos Szeredi Subject: Re: Difference between invalidating and deleting dentry References: <87h98mxhlk.fsf@vostro.rath.org> <87a8ecqkbp.fsf@vostro.rath.org> <1476114918.7959.3.camel@linux.vnet.ibm.com> <871szoqj6l.fsf@vostro.rath.org> <87k2d53y4a.fsf@vostro.rath.org> Date: Wed, 19 Oct 2016 14:00:49 -0700 In-Reply-To: (Miklos Szeredi's message of "Wed, 19 Oct 2016 10:38:49 +0200") Message-ID: <8737jsqcji.fsf@thinkpad.rath.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Oct 19 2016, Miklos Szeredi wrote: > On Wed, Oct 19, 2016 at 10:32 AM, Amir Goldstein wrote: >> On Wed, Oct 19, 2016 at 11:01 AM, Miklos Szeredi wrote: >>> On Wed, Oct 19, 2016 at 7:53 AM, Amir Goldstein wrote: >>>> On Wed, Oct 19, 2016 at 4:51 AM, Nikolaus Rath wrote: >>> >>>>> Really no one able to clarify the difference between the FUSE invalid= ate >>>>> and delete dentry requests? >>>> >>>> It may sound strange to you, but I think the documentation is clear en= ough. >>>> 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 time= out >>>> 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 vali= d. >>> >>> 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 --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB