[lkml]   [2019]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 00/24] Convert vfs.txt to vfs.rst
On Wed, Apr 03, 2019 at 12:00:54PM +1100, NeilBrown wrote:

> I would find it useful if the documentation said something about why
> this API exists at all. As you say, it cannot change the dentry - so
> what is it expected to do.


It tell filesystem that this dentry is going away now.

> I had a look at the two in-tree users and my guess is that it can be
> useful if the filesystem caches some other information which would be
> invalidated by a dentry being removed.
> I *think* cephfs has a flag which records if "All entries in a directory
> are currently in the dcache". When a dentry is pruned, that flag needs
> to be cleared.
> i.e. ->d_prune allows a filesystem to maintain summary state about what
> is currently in the dcache.

For one thing... Or, if you keep a (non-counting) reference to that
dentry, this tells you to forget it, etc.

I can think of other uses; it's really just telling the fs that this
is becoming an ex-parrot.

 \ /
  Last update: 2019-04-03 03:44    [W:0.107 / U:3.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site