public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: David Chinner <dgc@sgi.com>
Cc: Lachlan McIlroy <lachlan@sgi.com>, xfs-dev@sgi.com, xfs@oss.sgi.com
Subject: Re: Review: fix mapping invalidation callouts
Date: Thu, 11 Jan 2007 19:00:32 +1100	[thread overview]
Message-ID: <20070111080032.GD33919298@melbourne.sgi.com> (raw)
In-Reply-To: <20070111064958.GC33919298@melbourne.sgi.com>

On Thu, Jan 11, 2007 at 05:49:58PM +1100, David Chinner wrote:
> On Wed, Jan 10, 2007 at 08:39:33AM +0000, Lachlan McIlroy wrote:
> > David Chinner wrote:
> > >>+#define XFS_OFF_TO_PCSIZE(off)	\
> > >>+	(((off) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT)
> > >
> > >
> > >I don't think this is right.
> > >
> > >Assuming 4k page size, first = 2k, last = 6k will result in
> > >invalidating page indexes 1 and 2 i.e. offset 4k -> 12k. In fact,
> > >we want to invalidate pages 0 and 1.
> > >
> > >IOWs, I think it should be:
> > >
> > >+#define XFS_OFF_TO_PCINDEX(off)	((off) >> PAGE_CACHE_SHIFT)
> > >
> > >Comments?
> > >
> > 
> > Makes sense to me.
> 
> Yeah, you'd think so. The first xfsqa run I do -after- checking it in
> (been running for 24 hours) I get a stack dump with the warning
> in cancel_dirty_page(), so clearly this isn't right either. I'm
> not sure WTF is going on here.

Of course, I just realised that this is 2.6.19 that I'm testing
on (fmeh) and so the code is different - cancel-dirty_page()
doesn't exist in this tree, and the warning is coming from
invalidate_inode_pages2_range() because invalidate_complete_page2()
is returning an error for some reason.....

Looks like it's a partial page truncation problem.
invalidate_inode_pages2_range() fails on partial page truncation
when part of the page (i.e. a bufferhead) is dirty.

This looks like a _big_ mess.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2007-01-11  8:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08  4:03 Review: fix mapping invalidation callouts David Chinner
2007-01-08  9:09 ` Christoph Hellwig
2007-01-08 23:04   ` David Chinner
2007-01-09 11:57     ` Lachlan McIlroy
2007-01-10  0:10       ` David Chinner
2007-01-10  6:23 ` David Chinner
2007-01-10  8:39   ` Lachlan McIlroy
2007-01-11  6:49     ` David Chinner
2007-01-11  8:00       ` David Chinner [this message]
2007-01-11  8:01       ` David Chatterton

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=20070111080032.GD33919298@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=lachlan@sgi.com \
    --cc=xfs-dev@sgi.com \
    --cc=xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox