linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Walters <walters@verbum.org>
To: Jan Kara <jack@suse.cz>, "Wangkai (Kevin,C)" <wangkai86@huawei.com>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
	Waiman Long <longman@redhat.com>,
	"Renjinyong (Renjinyong,
	Business Support Dept)" <renjinyong@huawei.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] fs/dcache: dentries should free after files unlinked or directories removed
Date: Fri, 25 Aug 2017 11:10:03 -0400	[thread overview]
Message-ID: <1503673803.2650168.1084953360.73C357C4@webmail.messagingengine.com> (raw)
In-Reply-To: <20170825144702.GB6758@quack2.suse.cz>

On Fri, Aug 25, 2017, at 10:47 AM, Jan Kara wrote:
> 
> It is possible that some of these dentries are so rarely used that they are
> indeed just a waste 

In some cases - think containers, or ostree-style root filesystem snapshots,
if we do an `rm -rf /path/to/container-root`, userspace knows for a fact
that nothing will reference those paths again - all of the processes that could
have been killed.  There's no point to having negative dentries for them.

Maybe something like unlinkat (dfd, path, AT_UNLINKAT_DONTNEED), like
madvise (MAV_DONTNEED) ?

  reply	other threads:[~2017-08-25 15:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07  9:54 [PATCH] fs/dcache: dentries should free after files unlinked or directories removed Wangkai
2017-08-25  7:06 ` Wangkai (Kevin,C)
2017-08-25 14:47   ` Jan Kara
2017-08-25 15:10     ` Colin Walters [this message]
2017-08-25 16:43       ` Linus Torvalds
2017-08-26  6:56     ` Wangkai (Kevin,C)
2017-08-26 16:18       ` Linus Torvalds
2017-08-27 15:05         ` Waiman Long
2017-08-31  7:53           ` Jan Kara
2017-08-31 16:27             ` Waiman Long
2017-09-04 12:59               ` Jan Kara
2017-09-04 15:48                 ` Linus Torvalds
2017-09-04 21:45                 ` Waiman Long
2017-08-28  6:31         ` Wangkai (Kevin,C)

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=1503673803.2650168.1084953360.73C357C4@webmail.messagingengine.com \
    --to=walters@verbum.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=renjinyong@huawei.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wangkai86@huawei.com \
    /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).