From: David Chinner <dgc@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: David Chinner <dgc@sgi.com>, Adrian Bunk <bunk@stusta.de>,
Linus Torvalds <torvalds@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Sami Farin <7atbggg02@sneakemail.com>,
xfs-masters@oss.sgi.com
Subject: Re: 2.6.20-rc4: known regressions with patches (v3)
Date: Fri, 12 Jan 2007 10:05:24 +1100 [thread overview]
Message-ID: <20070111230524.GF33919298@melbourne.sgi.com> (raw)
In-Reply-To: <20070111140241.32f27a1b.akpm@osdl.org>
On Thu, Jan 11, 2007 at 02:02:41PM -0800, Andrew Morton wrote:
> On Fri, 12 Jan 2007 08:39:16 +1100
> David Chinner <dgc@sgi.com> wrote:
>
> > On Thu, Jan 11, 2007 at 06:13:29AM +0100, Adrian Bunk wrote:
> > > This email lists some known regressions in 2.6.20-rc4 compared to 2.6.19
> > > with patches available.
> > >
> > > Subject : BUG: at mm/truncate.c:60 cancel_dirty_page() (XFS)
> > > References : http://lkml.org/lkml/2007/1/5/308
> > > Submitter : Sami Farin <7atbggg02@sneakemail.com>
> > > Handled-By : David Chinner <dgc@sgi.com>
> > > Patch : http://lkml.org/lkml/2007/1/7/201
> > > Status : patch available
> >
> > Patch is broken, do not merge. The original had an off-by-one bug in
> > it, and the fixed one I have has just shown a worse problem than
> > before - partial page truncation (i.e. filesystem block size less
> > than page size) is busted because invalidate_complete_page2_range() can
> > only handle complete pages.
> >
> > Andrew - looking at unmap_mapping_pages, it says it cannot handle
> > partial pages and must get rid of them whereas vmtrucate() handles
> > partial pages but changes file size so can't be used. I see that
> > vmtruncate handles this by not unmapping the first partial page.
> >
> > I can use the vmtruncate mechanism (unmap_mapping_pages, then
> > truncate_inode_pages) but that seems racy to me because we are not
> > actually truncating the file so a mmap could remap a page between
> > the unmap and the truncate and hence we still get the warning.
>
> Yes, truncate relies upon there being nothing outside i_size, and that
> i_mutex is held.
>
> > So the question is - is there any generic function that handles
> > this case (i.e. don't unmap first partial page, unmap the rest,
> > partial truncate of first page, complete truncate of the rest)
> > without racing? Or do I need to write a variation of
> > invalidate_inode_pages2_range() to do this?
>
> umm, nothing I can immediately think of. Perhaps you can generalise
> vmtruncate_range() a bit?
I had a look at that - apart from being used for actually freeing disk
blocks as well (punching a hole in the file) - it requires locks that
we may or may not be able to grab and still has the problem of
separate calls to unmap_mapping_pages and truncate_inode_pages_range.
Unless I'm misunderstanding the purpose of vmtruncate_range() I
don't think it's the right API to be using because XFS only needs
to invalidate the page cache (hence my thoughts on a variant of
invalidate_inode_pages2_range being required).
Am I making sense, or do I need more coffe this morning?
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
prev parent reply other threads:[~2007-01-11 23:06 UTC|newest]
Thread overview: 126+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-07 6:19 Linux 2.6.20-rc4 Linus Torvalds
2007-01-07 10:56 ` Jan Engelhardt
2007-01-07 11:44 ` Russell King
2007-01-07 13:06 ` OT: character encodings (was: Linux 2.6.20-rc4) Tilman Schmidt
2007-01-07 15:13 ` David Woodhouse
2007-01-07 15:38 ` Russell King
2007-01-07 16:29 ` David Woodhouse
2007-01-07 17:06 ` Russell King
2007-01-07 19:11 ` Jan Engelhardt
2007-01-07 19:20 ` Russell King
2007-01-07 20:48 ` Willy Tarreau
2007-01-07 23:37 ` Adrian Bunk
2007-01-08 0:38 ` Willy Tarreau
2007-01-08 1:03 ` Adrian Bunk
2007-01-08 1:14 ` Willy Tarreau
2007-01-08 1:45 ` Adrian Bunk
2007-01-08 6:52 ` Jan Engelhardt
2007-01-08 8:02 ` Adrian Bunk
2007-01-08 1:32 ` OT: character encodings Tilman Schmidt
2007-01-08 1:59 ` Adrian Bunk
2007-01-08 19:53 ` OT: character encodings (was: Linux 2.6.20-rc4) Valdis.Kletnieks
2007-01-07 19:29 ` OT: character encodings Tilman Schmidt
[not found] ` <20070107195051.GF21133@flint.arm.linux.org.uk>
[not found] ` <45A17645.1030905@imap.cc>
2007-01-08 1:53 ` David Woodhouse
2007-01-07 18:21 ` OT: character encodings (was: Linux 2.6.20-rc4) Alan
2007-01-07 19:12 ` Jan Engelhardt
2007-01-07 22:30 ` Alan
2007-01-08 1:22 ` Jan Engelhardt
2007-01-08 20:17 ` Jan Engelhardt
2007-01-08 22:00 ` Ken Moffat
2007-01-08 23:21 ` Jan Engelhardt
2007-01-08 23:34 ` Eberhard Moenkeberg
2007-01-08 16:14 ` Pavel Machek
2007-01-08 22:17 ` Tim Pepper
2007-01-08 23:30 ` Jan Engelhardt
2007-01-07 19:17 ` Russell King
2007-01-07 19:58 ` Robin Rosenberg
2007-01-07 20:05 ` Dave Jones
2007-01-07 20:15 ` Sean
2007-01-07 20:40 ` Jan Engelhardt
2007-01-07 21:07 ` Xavier Bestel
2007-01-08 4:42 ` David Woodhouse
2007-01-08 1:40 ` Horst H. von Brand
2007-01-07 13:23 ` Linux 2.6.20-rc4 Alan
2007-01-07 12:15 ` Akula2
2007-01-07 12:55 ` Russell King
2007-01-07 13:38 ` Akula2
2007-01-07 13:53 ` Willy Tarreau
2007-01-07 14:23 ` Akula2
2007-01-07 20:57 ` Peter Osterlund
2007-01-07 21:04 ` Peter Osterlund
2007-01-08 15:50 ` Dmitry Torokhov
2007-01-07 22:50 ` Linus Torvalds
2007-01-08 1:00 ` David Miller
2007-01-08 6:38 ` Peter Osterlund
2007-01-08 20:49 ` Peter Osterlund
2007-01-08 21:52 ` David Miller
2007-01-08 22:33 ` Patrick McHardy
2007-01-08 22:33 ` Patrick McHardy
2007-01-08 23:02 ` Peter Osterlund
2007-01-08 23:12 ` Linus Torvalds
2007-01-09 3:42 ` Adrian Bunk
2007-01-09 7:39 ` David Miller
2007-01-09 7:39 ` David Miller
2007-01-07 21:22 ` Gene Heskett
2007-01-08 0:22 ` 2.6.20-rc4: known unfixed regressions Adrian Bunk
2007-01-08 0:22 ` Adrian Bunk
2007-01-08 1:20 ` Bernhard Schmidt
2007-01-08 1:20 ` Bernhard Schmidt
2007-01-08 0:25 ` 2.6.20-rc4: known regressions with patches available Adrian Bunk
2007-01-08 0:25 ` Adrian Bunk
2007-01-08 0:33 ` [Bluez-devel] " Marcel Holtmann
2007-01-08 0:33 ` Marcel Holtmann
2007-01-08 0:33 ` Marcel Holtmann
2007-01-08 14:50 ` Linux 2.6.20-rc4 Mariusz Kozlowski
2007-01-08 14:50 ` Mariusz Kozlowski
2007-01-08 14:58 ` Sylvain Munaut
2007-01-08 14:58 ` Sylvain Munaut
2007-01-08 15:03 ` Mariusz Kozlowski
2007-01-08 15:03 ` Mariusz Kozlowski
2007-01-08 19:11 ` Jean Delvare
2007-01-08 19:11 ` Jean Delvare
2007-01-09 0:38 ` Benjamin Herrenschmidt
2007-01-09 0:38 ` Benjamin Herrenschmidt
2007-01-09 0:56 ` Greg KH
2007-01-09 0:56 ` Greg KH
2007-01-09 2:05 ` Benjamin Herrenschmidt
2007-01-09 2:05 ` Benjamin Herrenschmidt
2007-01-09 7:04 ` David Woodhouse
2007-01-09 7:04 ` David Woodhouse
2007-01-09 7:04 ` Sylvain Munaut
2007-01-09 7:04 ` Sylvain Munaut
2007-01-09 9:04 ` Benjamin Herrenschmidt
2007-01-09 9:04 ` Benjamin Herrenschmidt
2007-01-09 7:14 ` Sylvain Munaut
2007-01-09 7:14 ` Sylvain Munaut
2007-01-09 7:28 ` David Woodhouse
2007-01-09 7:28 ` David Woodhouse
2007-01-09 9:08 ` Benjamin Herrenschmidt
2007-01-09 9:08 ` Benjamin Herrenschmidt
2007-01-09 9:07 ` Benjamin Herrenschmidt
2007-01-09 9:07 ` Benjamin Herrenschmidt
2007-01-09 7:18 ` Greg KH
2007-01-09 7:18 ` Greg KH
2007-01-09 5:25 ` 2.6.20-rc4: known unfixed regressions (v2) Adrian Bunk
2007-01-09 5:25 ` Adrian Bunk
2007-01-09 17:58 ` Linus Torvalds
2007-01-09 18:08 ` Malte Schröder
2007-01-09 18:30 ` Linus Torvalds
2007-01-11 0:24 ` Vladimir V. Saveliev
2007-01-11 1:00 ` Nick Piggin
2007-01-11 13:12 ` Vladimir V. Saveliev
2007-01-11 23:53 ` Nick Piggin
2007-01-09 20:28 ` Adrian Bunk
2007-01-09 5:51 ` 2.6.20-rc4: known regressions with patches (v2) Adrian Bunk
2007-01-09 5:51 ` Adrian Bunk
2007-01-11 5:10 ` 2.6.20-rc4: known unfixed regressions (v3) Adrian Bunk
2007-01-11 6:43 ` Nick Piggin
2007-01-11 8:45 ` Adrian Bunk
2007-01-11 10:21 ` Jiri Kosina
2007-01-11 10:54 ` Adrian Bunk
2007-01-11 11:08 ` CIJOML
[not found] ` <Pine.LNX.4.64.0701062216210.3661-AgDkxUvNf0y7TbgM5vRIOg@public.gmane.org>
2007-01-11 5:13 ` 2.6.20-rc4: known regressions with patches (v3) Adrian Bunk
2007-01-11 5:13 ` Adrian Bunk
2007-01-11 21:39 ` David Chinner
2007-01-11 22:02 ` Andrew Morton
2007-01-11 23:05 ` David Chinner [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=20070111230524.GF33919298@melbourne.sgi.com \
--to=dgc@sgi.com \
--cc=7atbggg02@sneakemail.com \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=xfs-masters@oss.sgi.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 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.