From: Nick Piggin <npiggin@suse.de>
To: Chris Mason <chris.mason@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mikulas Patocka <mpatocka@redhat.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: [patch 5/8] mm: write_cache_pages integrity fix
Date: Thu, 9 Oct 2008 16:50:24 +0200 [thread overview]
Message-ID: <20081009145024.GF9941@wotan.suse.de> (raw)
In-Reply-To: <1223563163.14090.18.camel@think.oraclecorp.com>
On Thu, Oct 09, 2008 at 10:39:23AM -0400, Chris Mason wrote:
> On Thu, 2008-10-09 at 16:21 +0200, Nick Piggin wrote:
> > On Thu, Oct 09, 2008 at 10:12:55AM -0400, Chris Mason wrote:
> > > On Thu, 2008-10-09 at 15:55 +0200, Nick Piggin wrote:
> > > > On Thu, Oct 09, 2008 at 09:35:58AM -0400, Chris Mason wrote:
> > > > > On Thu, 2008-10-09 at 15:27 +0200, Nick Piggin wrote:
> > > > >
> > > > > I don't think do_sync_mapping_range is broken as is. It simply splits
> > > > > the operations into different parts. The caller can request that we
> > > > > wait for pending IO first.
> > > >
> > > > It is. Not because of it's whacky API, but because it uses WB_SYNC_NONE.
> > > >
> > > >
> > > > > WB_SYNC_NONE none just means don't wait for IO in flight, and there are
> > > > > valid uses for it that will slow down if you switch them all to
> > > > > WB_SYNC_ALL.
> > > >
> > > > To write_cache_pages it means that, but further down the chain (eg.
> > > > block_write_full_page) it also means not to wait on other stuff.
> > > >
> > > > It has broadly meant "don't worry about data integirty" for a long time
> > > > AFAIKS.
> > >
> > > Sadly it has broadly meant different things to different people ;)
> > > You're right, block_write_full_page is broken.
> >
> > Well, I really just think it is do_sync_mapping_range that is broken.
> > Because __sync_single_inode treats WB_SYNC_NONE as a general "nowait",
> > so does __writeback_single_inode. Weakest semantics define the API :)
>
> Unfortunately these things are using the flag differently
> __sync_single_inode and __writeback_single_inode do different things
> with the flag than people that end up directly calling the writepages
> methods.
Sure, but it's the "nowait" semantics that they want, right? And *they*
eventually call into writepages. So they want similar semantics from
writepages, presumably.
The comment in WB_SYNC_NONE definition kind of suggests it meant don't
wait for anything when it was written...
> At the write_cache_pages level, WB_SYNC_NONE should only change the
> waiting for IO in flight.
Aside from do_sync_mapping_range, what are other reasons to enforce
the same thing all up and down the writeout stack? If there are good
reasons, let's add WB_SYNC_WRITEBACK?
next prev parent reply other threads:[~2008-10-09 14:50 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 15:50 [patch 0/8] write_cache_pages fixes npiggin
2008-10-09 15:50 ` [patch 1/8] mm: write_cache_pages cyclic fix npiggin
2008-10-09 15:50 ` [patch 2/8] mm: write_cache_pages AOP_WRITEPAGE_ACTIVATE fix npiggin
2008-10-10 16:00 ` Miklos Szeredi
2008-10-10 18:29 ` Hugh Dickins
2008-10-11 4:05 ` Nick Piggin
2008-10-09 15:50 ` [patch 3/8] mm: write_cache_pages writepage error fix npiggin
2008-10-09 15:50 ` [patch 4/8] mm: write_cache_pages type overflow fix npiggin
2008-10-09 8:23 ` Christoph Hellwig
2008-10-09 8:33 ` Nick Piggin
2008-10-10 13:10 ` Theodore Tso
2008-10-10 13:13 ` Christoph Hellwig
2008-10-10 13:37 ` Theodore Tso
2008-10-10 13:48 ` Steven Whitehouse
2008-10-10 14:05 ` Theodore Tso
2008-10-10 14:08 ` Christoph Hellwig
2008-10-10 15:54 ` Aneesh Kumar K.V
2008-10-10 15:59 ` Chris Mason
2008-10-10 16:10 ` Theodore Tso
2008-10-10 16:34 ` Christoph Hellwig
2008-10-10 13:56 ` Chris Mason
2008-10-09 15:50 ` [patch 5/8] mm: write_cache_pages integrity fix npiggin
2008-10-09 12:52 ` Chris Mason
2008-10-09 13:27 ` Nick Piggin
2008-10-09 13:35 ` Chris Mason
2008-10-09 13:55 ` Nick Piggin
2008-10-09 14:12 ` Chris Mason
2008-10-09 14:21 ` Nick Piggin
2008-10-09 14:39 ` Chris Mason
2008-10-09 14:50 ` Nick Piggin [this message]
2008-10-09 15:16 ` Chris Mason
2008-10-10 2:40 ` Nick Piggin
2008-10-09 15:50 ` [patch 6/8] mm: write_cache_pages cleanups npiggin
2008-10-09 14:37 ` Artem Bityutskiy
2008-10-09 15:50 ` [patch 7/8] mm: write_cache_pages optimise page cleaning npiggin
2008-10-09 15:50 ` [patch 8/8] mm: write_cache_pages terminate quickly npiggin
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=20081009145024.GF9941@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpatocka@redhat.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;
as well as URLs for NNTP newsgroup(s).