From: Mukesh Ojha <mojha@codeaurora.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: Query on shrink list
Date: Fri, 17 Aug 2018 20:07:59 +0530 [thread overview]
Message-ID: <b638d027-023a-d455-f77e-d66c10b8d9e4@codeaurora.org> (raw)
In-Reply-To: <20180817125812.GC6515@ZenIV.linux.org.uk>
On 8/17/2018 6:28 PM, Al Viro wrote:
> On Fri, Aug 17, 2018 at 03:39:22PM +0530, Mukesh Ojha wrote:
>> Hi Al Viro,
>>
>> Is there is reason we have kept data->found++, if the dentry already there
>> in shrink list ?
>>
>> static enum d_walk_ret select_collect(
>> ...
>> if (dentry->d_flags & DCACHE_SHRINK_LIST) {
>> data->found++;
>> } else {
>> ..
>>
>> If the dentry is already there on shrink list, does it not mean that
>> data->found is already non-zero ?
> Nope. It can be on *another* shrink list - if two processes are doing
> that...
Ok, if we go out simply, letting others to do the job will break
`shrink_dcache_parent()`
and if someone touched that dentry made the refcount > 0 while it is on
shrink list
then owner will keep on looping in shrink_dentry_list() until refcount
becomes 0 .
Am i making sense here ?
Thanks.
Mukesh
>
>> Can't we just go out from here directly?
prev parent reply other threads:[~2018-08-17 14:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 10:09 Query on shrink list Mukesh Ojha
2018-08-17 12:58 ` Al Viro
2018-08-17 14:37 ` Mukesh Ojha [this message]
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=b638d027-023a-d455-f77e-d66c10b8d9e4@codeaurora.org \
--to=mojha@codeaurora.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).