public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Carl Ritson <critson@perlfu.co.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: OOPS: 2.5.1-pre8 - cdrecord + ide_scsi
Date: Sun, 9 Dec 2001 11:22:08 +0100	[thread overview]
Message-ID: <20011209102208.GC20061@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.33.0112090919220.1468-100000@eden.lincnet>
In-Reply-To: <Pine.LNX.4.33.0112090919220.1468-100000@eden.lincnet>

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

On Sun, Dec 09 2001, Carl Ritson wrote:
> Got this at the very start of burning a cd, nothing special, using
> ide-scsi build into kernel. "cdrecord -v dev=0,0,0 speed=4 img.iso".
> Box is Dual-PIII 866, 1GB Ram, all IDE system.

Agrh, because of a bug in ide-scsi conversion this (other) bug went
unnoticed for a while. Basically we cannot look up the request queue
reliably from a request, since it may not have originated from the block
layer. ide-scsi builds it's own, for example. For those, we don't want
to trust the sg count either.

Does attached patch work?

-- 
Jens Axboe


[-- Attachment #2: ide-dma-queue-1 --]
[-- Type: text/plain, Size: 641 bytes --]

--- /opt/kernel/linux-2.5.1-pre8/drivers/ide/ide-dma.c	Sun Dec  9 03:54:19 2001
+++ drivers/ide/ide-dma.c	Sun Dec  9 05:03:15 2001
@@ -226,12 +226,13 @@
 
 static int ide_build_sglist (ide_hwif_t *hwif, struct request *rq)
 {
+	request_queue_t *q = &hwif->drives[DEVICE_NR(rq->rq_dev) & 1].queue;
 	struct scatterlist *sg = hwif->sg_table;
 	int nents;
 
-	nents = blk_rq_map_sg(rq->q, rq, hwif->sg_table);
+	nents = blk_rq_map_sg(q, rq, hwif->sg_table);
 
-	if (nents > rq->nr_segments)
+	if (rq->q && nents > rq->nr_segments)
 		printk("ide-dma: received %d segments, build %d\n", rq->nr_segments, nents);
 
 	if (rq_data_dir(rq) == READ)

  reply	other threads:[~2001-12-09 10:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-09  9:26 OOPS: 2.5.1-pre8 - cdrecord + ide_scsi Carl Ritson
2001-12-09 10:22 ` Jens Axboe [this message]
2001-12-09 10:31   ` Jens Axboe
2001-12-09 13:52     ` Carl Ritson
2001-12-09 13:58       ` Jens Axboe
2001-12-09 15:35         ` Carl Ritson
2001-12-09 15:38           ` Jens Axboe
2001-12-11 14:28             ` Jens Axboe
2001-12-12  8:02               ` Carl Ritson
2001-12-12  9:38                 ` Jens Axboe
2001-12-15  0:06             ` Andre Hedrick
2001-12-15 10:13               ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2001-12-15 15:03 Thomas Hood

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=20011209102208.GC20061@suse.de \
    --to=axboe@suse.de \
    --cc=critson@perlfu.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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