From: "Stephen C. Tweedie" <sct@redhat.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Andrew Morton <akpm@zip.com.au>,
Linus Torvalds <torvalds@transmeta.com>,
Andrea Arcangeli <andrea@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] Patch: aliasing bug in blockdev-in-pagecache?
Date: Sun, 14 Apr 2002 14:08:37 +0100 [thread overview]
Message-ID: <20020414140837.A2119@redhat.com> (raw)
In-Reply-To: <20020413235948.E4937@redhat.com> <Pine.GSO.4.21.0204140857190.394-100000@weyl.math.psu.edu>
Hi,
On Sun, Apr 14, 2002 at 08:59:15AM -0400, Alexander Viro wrote:
> On Sat, 13 Apr 2002, Stephen C. Tweedie wrote:
>
> > To solve this, we really do need to have block_read_full_page() test
> > the uptodate state under protection of the buffer_head lock. We
> > already go through 3 stages in block_read_full_page(): gather the
> > buffers needing IO, then lock them, then submit the IO. To be safe,
> > we need a final test for buffer_uptodate() *after* we have locked the
> > required buffers.
>
> Ouch.
>
> I suspect that correct fix is to do that test in submit_bh() itself
> (and remove it from ll_rw_block()). IMO it's cleaner than messing
> with all callers out there... Linus?
Actually, if we move the test to submit_bh(), we _do_ need to mess
with all callers.
submit_bh() is currently an unconditional demand to perform a given IO
regardless of buffer state, so lots of callers (ext3 journal writes,
soft raid mirror writes etc) call it with private buffer_heads which
just don't have any persistent dirty / uptodate state. Changing
submit_bh() still means we need to audit all callers to make sure that
they set up those state flags correctly even for private bh'es.
Cheers,
Stephen
next prev parent reply other threads:[~2002-04-14 13:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-13 22:59 [RFC] Patch: aliasing bug in blockdev-in-pagecache? Stephen C. Tweedie
2002-04-13 23:16 ` Andrew Morton
2002-04-14 12:59 ` Alexander Viro
2002-04-14 13:08 ` Stephen C. Tweedie [this message]
2002-04-16 18:01 ` Andrea Arcangeli
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=20020414140837.A2119@redhat.com \
--to=sct@redhat.com \
--cc=akpm@zip.com.au \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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