public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Nick Piggin <npiggin@suse.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs failing fsx-linux
Date: Wed, 9 Sep 2009 09:47:43 -0400	[thread overview]
Message-ID: <20090909134743.GA3130@think> (raw)
In-Reply-To: <20090909134351.GD6034@wotan.suse.de>

On Wed, Sep 09, 2009 at 03:43:51PM +0200, Nick Piggin wrote:
> On Wed, Sep 09, 2009 at 09:37:29AM -0400, Chris Mason wrote:
> > On Wed, Sep 09, 2009 at 03:34:35PM +0200, Nick Piggin wrote:
> > > Which cases do set_page_dirty happen without page_mkwrite? For fsx-linux
> > > I hope there shouldn't be any...
> > 
> > I've been assuming its the zap_pte_range part, but now I have enough
> > code around it to make stack traces.
> 
> OK, because AFAIK we're _supposed_ to be able to close all that
> up since the last round of page_mkwrite fixes here, so pte state
> will not be out of state with page state.
> 
> Yes set_page_dirty still gets called there, for fses without
> page_mkwrite or which don't try hard to keep in sync. But if you
> return with the page locked from page_mkwrite, this set_page_diryt
> call should always find the page dirty (I hope).
> 
> 
> > > but one issue with btrfs's page_mkwrite
> > > is that it still unlocks the page before page_mkwrite returns so if it
> > > is anything like other filesystems, the page might get written out
> > > between the page_mkwrite and the page fault's subsequent set_page_dirty.
> > > 
> > > So if that race is hitting, it might appear like set_page_dirty is
> > > being called without a page_mkwrite.
> > 
> > Good point, I'll make sure.
> 
> Though if it has exposed a bug, that's a good thing too; you still
> want to handle that case (for now) due to the get_uesr_pages problem.

Yeah, I'll hammer on it until the handler works and then I'll fixup
page_mkwrite to leave things locked.

-chris


  reply	other threads:[~2009-09-09 13:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 17:26 btrfs failing fsx-linux Nick Piggin
2009-08-18 17:59 ` Josef Bacik
2009-08-19  8:50   ` Nick Piggin
2009-09-02 17:14   ` Nick Piggin
2009-09-02 17:29     ` Josef Bacik
2009-09-02 19:07     ` Chris Mason
2009-09-03  7:10       ` Nick Piggin
2009-09-09 13:13 ` Chris Mason
2009-09-09 13:34   ` Nick Piggin
2009-09-09 13:37     ` Chris Mason
2009-09-09 13:43       ` Nick Piggin
2009-09-09 13:47         ` Chris Mason [this message]
2009-09-11 19:36 ` Chris Mason

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=20090909134743.GA3130@think \
    --to=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=npiggin@suse.de \
    /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