From: Andrew Morton <akpm@zip.com.au>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG] loop.c oopses
Date: Tue, 16 Jul 2002 00:07:54 -0700 [thread overview]
Message-ID: <3D33C64A.7491B591@zip.com.au> (raw)
In-Reply-To: 20020716062453.GK1022@holomorphy.com
William Lee Irwin III wrote:
>
> loop.c oopses when bio_copy() returns NULL. This was encountered while
> running dbench 16 on a loopback-mounted reiserfs filesystem.
ugh. GFP_NOIO is evil. I guess it's better to add __GFP_HIGH
there, but it's not a happy solution.
> ...
>
> If what I've done is proper, it may be necessary to allow
> try_to_free_buffers() to fail if (!was_uptodate && PageUptodate(page))
Is OK - that's just overeager whining. You received an IO error
during a write. This marks the buffer not uptodate. (Heaven
knows why, because it clearly *is* uptodate). And try_to_free_buffers
doesn't like seeing a non-uptodate buffer against an uptodate
page: it violates the alleged page/buffer state coherency.
Some sucker needs to go through and test-n-fix all the IO handling
paths. He'll probably leave that until after "feature freeze".
loop.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
--- 2.5.25/drivers/block/loop.c~wli-loop-fix Mon Jul 15 23:58:10 2002
+++ 2.5.25-akpm/drivers/block/loop.c Mon Jul 15 23:59:32 2002
@@ -457,8 +457,9 @@ static struct bio *loop_get_buffer(struc
goto out_bh;
}
- bio = bio_copy(rbh, GFP_NOIO, rbh->bi_rw & WRITE);
-
+ bio = bio_copy(rbh, GFP_NOIO|__GFP_HIGH, rbh->bi_rw & WRITE);
+ if (bio == NULL)
+ goto out;
bio->bi_end_io = loop_end_io_transfer;
bio->bi_private = rbh;
@@ -466,7 +467,7 @@ out_bh:
bio->bi_sector = rbh->bi_sector + (lo->lo_offset >> 9);
bio->bi_rw = rbh->bi_rw;
bio->bi_bdev = lo->lo_device;
-
+out:
return bio;
}
@@ -537,6 +538,8 @@ static int loop_make_request(request_que
* piggy old buffer on original, and submit for I/O
*/
new_bio = loop_get_buffer(lo, old_bio);
+ if (new_bio == NULL)
+ goto out;
IV = loop_get_iv(lo, old_bio->bi_sector);
if (rw == WRITE) {
if (bio_transfer(lo, new_bio, old_bio))
.
next prev parent reply other threads:[~2002-07-16 6:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-16 6:24 [BUG] loop.c oopses William Lee Irwin III
2002-07-16 7:07 ` Andrew Morton [this message]
2002-07-16 8:31 ` Jens Axboe
2002-07-16 8:52 ` Andrew Morton
2002-07-16 8:48 ` Jens Axboe
2002-07-16 9:09 ` Andrew Morton
2002-07-16 8:52 ` William Lee Irwin III
2002-07-16 9:19 ` Andrew Morton
2002-07-16 9:16 ` William Lee Irwin III
2002-07-16 9:21 ` Jens Axboe
2002-07-16 12:49 ` Rik van Riel
2002-07-16 16:36 ` Jens Axboe
2002-07-16 16:49 ` Rik van Riel
2002-07-16 17:09 ` Jens Axboe
2002-07-16 19:42 ` Jari Ruusu
2002-07-16 21:14 ` William Lee Irwin III
2002-07-16 21:36 ` Andrew Morton
2002-07-17 5:40 ` Jens Axboe
2002-07-17 15:31 ` Jari Ruusu
2002-07-20 17:03 ` William Lee Irwin III
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=3D33C64A.7491B591@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.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.