From: Chris Mason <chris.mason@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Shane Shrybman <shrybman@teksavvy.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Oops while rebalancing, now unmountable.
Date: Mon, 15 Nov 2010 14:18:22 -0500 [thread overview]
Message-ID: <1289848574-sup-2632@think> (raw)
In-Reply-To: <20101115191204.GB11374@infradead.org>
Excerpts from Christoph Hellwig's message of 2010-11-15 14:12:04 -0500:
> On Mon, Nov 15, 2010 at 07:46:57PM +0100, Andrea Arcangeli wrote:
> > I've been reading the writeout() in mm/migrate.c and I wonder if mayb=
e
> > that should have been WB_SYNC_ALL or if we miss a
> > wait_on_page_writeback in after ->writepage() returns? Can you have a
> > look there? We check the PG_writeback bit when the page is not dirty
> > (well before fallback_migrate_page is called), but after calling
> > writeout() we don't return to wait on PG_writeback. We make sure to
> > hold the page lock after ->writepage returns but that doesn't mean
> > PG_writeback isn't still set.
>=20
> I didn't even notice that, but the WB_SYNC_NONE does indeed seem
> buggy to me. If we set the sync_mode to WB_SYNC_NONE filesystem
> can and frequently do trylock operations and might just skip to
> write it out completely.
>=20
> So we defintively do need to change writeout to do a WB_SYNC_ALL
> writeback. In addition to that we'll also need the
> wait_on_page_writeback call to make sure we actually wait for I/O
> to finish.
>=20
> Also what protects us from updating the page while we write it out?
> PG_writeback on many filesystems doesn't protect writes from modifying
> the in-flight buffer, and just locking the page after ->writepage
> is racy without a check that nothing changed.
>=20
Oh, I should have thought of that. Btrfs (and most of the time xfs?)
will wait on PageWriteback internally, but for the ext crowd we're in
trouble.
-chris
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=3Dmailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Chris Mason <chris.mason@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Shane Shrybman <shrybman@teksavvy.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Oops while rebalancing, now unmountable.
Date: Mon, 15 Nov 2010 14:18:22 -0500 [thread overview]
Message-ID: <1289848574-sup-2632@think> (raw)
In-Reply-To: <20101115191204.GB11374@infradead.org>
Excerpts from Christoph Hellwig's message of 2010-11-15 14:12:04 -0500:
> On Mon, Nov 15, 2010 at 07:46:57PM +0100, Andrea Arcangeli wrote:
> > I've been reading the writeout() in mm/migrate.c and I wonder if maybe
> > that should have been WB_SYNC_ALL or if we miss a
> > wait_on_page_writeback in after ->writepage() returns? Can you have a
> > look there? We check the PG_writeback bit when the page is not dirty
> > (well before fallback_migrate_page is called), but after calling
> > writeout() we don't return to wait on PG_writeback. We make sure to
> > hold the page lock after ->writepage returns but that doesn't mean
> > PG_writeback isn't still set.
>
> I didn't even notice that, but the WB_SYNC_NONE does indeed seem
> buggy to me. If we set the sync_mode to WB_SYNC_NONE filesystem
> can and frequently do trylock operations and might just skip to
> write it out completely.
>
> So we defintively do need to change writeout to do a WB_SYNC_ALL
> writeback. In addition to that we'll also need the
> wait_on_page_writeback call to make sure we actually wait for I/O
> to finish.
>
> Also what protects us from updating the page while we write it out?
> PG_writeback on many filesystems doesn't protect writes from modifying
> the in-flight buffer, and just locking the page after ->writepage
> is racy without a check that nothing changed.
>
Oh, I should have thought of that. Btrfs (and most of the time xfs?)
will wait on PageWriteback internally, but for the ext crowd we're in
trouble.
-chris
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-11-15 19:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 17:10 Oops while rebalancing, now unmountable Shane Shrybman
2010-11-08 17:55 ` Chris Mason
2010-11-08 20:39 ` Shane Shrybman
2010-11-08 21:04 ` Chris Mason
2010-11-08 21:25 ` Shane Shrybman
2010-11-09 13:42 ` Chris Mason
2010-11-09 18:21 ` Shane Shrybman
2010-11-14 19:55 ` Shane Shrybman
2010-11-14 20:42 ` Andrea Arcangeli
2010-11-14 22:00 ` Christoph Hellwig
2010-11-14 22:00 ` Christoph Hellwig
2010-11-14 22:12 ` Andrea Arcangeli
2010-11-15 18:23 ` Christoph Hellwig
2010-11-15 18:23 ` Christoph Hellwig
2010-11-15 18:46 ` Chris Mason
2010-11-15 18:46 ` Chris Mason
2010-11-15 19:03 ` Christoph Hellwig
2010-11-15 19:03 ` Christoph Hellwig
2010-11-16 21:48 ` Shane Shrybman
2010-11-16 21:48 ` Shane Shrybman
2010-11-15 18:46 ` Andrea Arcangeli
2010-11-15 19:03 ` Chris Mason
2010-11-15 19:03 ` Chris Mason
2010-11-15 19:16 ` Andrea Arcangeli
2010-11-15 19:12 ` Christoph Hellwig
2010-11-15 19:12 ` Christoph Hellwig
2010-11-15 19:18 ` Chris Mason [this message]
2010-11-15 19:18 ` Chris Mason
2010-11-15 19:29 ` Andrea Arcangeli
2010-11-15 20:54 ` Christoph Hellwig
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=1289848574-sup-2632@think \
--to=chris.mason@oracle.com \
--cc=aarcange@redhat.com \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shrybman@teksavvy.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.