From: Andrew Morton <akpm@osdl.org>
To: Andrea Arcangeli <andrea@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: invalidate_inode_pages2
Date: Tue, 18 May 2004 17:27:18 -0700 [thread overview]
Message-ID: <20040518172718.773d32c1.akpm@osdl.org> (raw)
In-Reply-To: <20040519001520.GO3044@dualathlon.random>
Andrea Arcangeli <andrea@suse.de> wrote:
>
> Something broke in invalidate_inode_pages2 between 2.4 and 2.6, this
> causes malfunctions with mapped pages in 2.6.
What is the malfunction?
> I guess the below untested one liner should be enough to fix it. The
> only single point of invalidate_inode_pages2, is to invalidate _mapped_
> pages too. Otherwise we could as well use invalidate_inode_pages.
> Clearly the dirty bit doesn't mean invalidate, invalidate primarly means
> clearing the uptodate bitflag.
>
> --- sles/mm/truncate.c.~1~ 2004-05-18 19:24:40.000000000 +0200
> +++ sles/mm/truncate.c 2004-05-19 02:09:28.311781864 +0200
> @@ -260,9 +260,10 @@ void invalidate_inode_pages2(struct addr
> if (page->mapping == mapping) { /* truncate race? */
> wait_on_page_writeback(page);
> next = page->index + 1;
> - if (page_mapped(page))
> + if (page_mapped(page)) {
> + ClearPageUptodate(page);
> clear_page_dirty(page);
> - else
> + } else
> invalidate_complete_page(mapping, page);
> }
> unlock_page(page);
It's currently the case that pages which are mapped into process pagetables
are always up to date, which sounds like a good invariant to have. This
changes that rule. I dunno if it'll break anything though.
next prev parent reply other threads:[~2004-05-19 0:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-19 0:15 invalidate_inode_pages2 Andrea Arcangeli
2004-05-19 0:27 ` Andrew Morton [this message]
2004-05-19 0:51 ` invalidate_inode_pages2 Andrea Arcangeli
2004-05-19 1:00 ` invalidate_inode_pages2 Andrew Morton
2004-05-19 1:08 ` invalidate_inode_pages2 Andrea Arcangeli
2004-05-19 5:08 ` invalidate_inode_pages2 Jan Harkes
2004-05-19 5:16 ` invalidate_inode_pages2 Andrea Arcangeli
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=20040518172718.773d32c1.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@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.