From: Ivan Shapovalov <intelfx@intelfx.name>
To: Edward Shishkin <edward.shishkin@gmail.com>,
reiserfs-devel@vger.kernel.org
Subject: Re: [PATCH] Adjust reiser4 for 3.15: replace truncate_inode_pages(..., 0) with truncate_inode_pages_final(...).
Date: Mon, 03 Oct 2016 22:45:31 +0300 [thread overview]
Message-ID: <1475523931.3029.17.camel@intelfx.name> (raw)
In-Reply-To: <1475505646.3029.13.camel@intelfx.name>
[-- Attachment #1: Type: text/plain, Size: 1542 bytes --]
On 2016-10-03 at 17:40 +0300, Ivan Shapovalov wrote:
> On 2016-10-03 at 16:29 +0200, Edward Shishkin wrote:
> > On 09/30/2016 08:47 AM, Ivan Shapovalov wrote:
> > > On 2016-09-30 at 09:43 +0300, Ivan Shapovalov wrote:
> > > > [...]
> > >
> > > BTW, this raises a question: in the ->evict_inode path, are we
> > > ever
> > > allowed to call plain truncate_inode_pages() (i. e. not
> > > *_final())?
> >
> > Actually, I would like to see a kind of assertion 1487 instead:
> > everything should be already truncated at that point.
>
> Do you mean that the assertion should go instead of
> truncate_inode_pages_final()? Doesn't that function contain extra
> logic, beyond removing pages?
>
> Moreover, that function seems to contain extra logic _before_
> actually
> going off and truncating pages. This makes me wonder: doesn't this
> mean
> that we _must not ever_ call regular truncate_inode_pages() from
> inside ->evict_inode()?
>
> I do not know VFS enough to answer these kinds of stupid questions...
Looks like the answer is "no, everything is OK". If ->evict_inode()
races with remove_mapping() and shadow entries are installed into the
radix tree, the *_final() call will still catch them. By association
this means that this call is still needed.
(However, now I wonder how does this work with regular truncate and
whether the radix tree can hold shadow entries for already truncated
pages during an inode's lifetime, but this is a purely VFS/mm
question.)
--
Ivan Shapovalov / intelfx /
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2016-10-03 19:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 6:36 [PATCH] reiser4: missed patch in porting to 3.15 Ivan Shapovalov
2016-09-30 6:43 ` [PATCH] Adjust reiser4 for 3.15: replace truncate_inode_pages(..., 0) with truncate_inode_pages_final(...) Ivan Shapovalov
2016-09-30 6:47 ` Ivan Shapovalov
2016-10-03 14:29 ` Edward Shishkin
2016-10-03 14:40 ` Ivan Shapovalov
2016-10-03 19:45 ` Ivan Shapovalov [this message]
2016-10-04 15:44 ` Edward Shishkin
2016-10-03 14:08 ` Edward Shishkin
-- strict thread matches above, loose matches on Subject: below --
2015-02-13 12:49 Ivan Shapovalov
2015-02-13 14:59 ` Edward Shishkin
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=1475523931.3029.17.camel@intelfx.name \
--to=intelfx@intelfx.name \
--cc=edward.shishkin@gmail.com \
--cc=reiserfs-devel@vger.kernel.org \
/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.