public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org, Jens Axboe <axboe@suse.de>
Subject: Re: [2.6.13] pktcdvd: IO-errors
Date: 28 Sep 2005 23:02:14 +0200	[thread overview]
Message-ID: <m3hdc4ucrt.fsf@telia.com> (raw)
In-Reply-To: <Pine.LNX.4.60.0509262358020.6722@poirot.grange>

Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:

> On Mon, 26 Sep 2005, Peter Osterlund wrote:
> 
> > OK. Another option since you have one good and one bad kernel, is to
> > try to find the point in time where it broke. If you are a git user,
> 
> No, I am not.
> 
> > you can use the "git bisect" method. If not, you can use -rc releases
> > from ftp.kernel.org.
> 
> I think, I have an easier test - I just replaced the pktcdvd.[hc] in 
> 2.6.13.1 with respective files from 2.6.12, and it worked. The diff is 
> pretty small, so, it should be possible to actually find the culprit 
> there. E.g., here's the comment, that came in with 2.6.13:
> 
> - * - Optimize for throughput at the expense of latency. This means that streaming
> - *   writes will never be interrupted by a read, but if the drive has to seek
> - *   before the next write, switch to reading instead if there are any pending
> - *   read requests.

That's quite disturbing unfortunately.

The driver works by sending reads, writes, and synchronize cache
commands to the real CD/DVD driver, which then forwards them to the
drive firmware. Except during startup, the driver will send one or
more read requests, followed by one or more write requests, followed
by exactly one synchronize cache request, and then start over with
read requests.

That patch changes the logic that decides when the driver should
change between reading and writing. However, the read/write/sync
sequence that makes your drive fail in 2.6.13 could theoretically
happen in 2.6.12 as well if you are unlucky.

I think some trial and error will be required to figure out what
causes your drive to fail. If you apply this patch to 2.6.12, does it
still work?

--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2131,7 +2131,7 @@ static int pkt_make_request(request_queu
 		cloned_bio->bi_private = psd;
 		cloned_bio->bi_end_io = pkt_end_io_read_cloned;
 		pd->stats.secs_r += bio->bi_size >> 9;
-		pkt_queue_bio(pd, cloned_bio, 1);
+		pkt_queue_bio(pd, cloned_bio, 0);
 		return 0;
 	}
 

-- 
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340

  reply	other threads:[~2005-09-28 21:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-24 19:32 [2.6.13] pktcdvd: IO-errors Guennadi Liakhovetski
2005-09-25  9:09 ` Peter Osterlund
2005-09-25 21:06   ` Guennadi Liakhovetski
2005-09-26 18:36     ` Peter Osterlund
2005-09-26 19:29       ` Guennadi Liakhovetski
2005-09-26 19:48         ` Peter Osterlund
2005-09-26 22:06           ` Guennadi Liakhovetski
2005-09-28 21:02             ` Peter Osterlund [this message]
2005-09-29 19:18               ` Guennadi Liakhovetski
2005-10-02 12:11                 ` Peter Osterlund
2005-10-08 22:37                   ` Guennadi Liakhovetski
2005-10-09 21:23                   ` Guennadi Liakhovetski
2005-10-09 21:54                     ` Peter Osterlund
2005-10-10  5:05                       ` Guennadi Liakhovetski
2005-10-10 17:48                       ` Guennadi Liakhovetski
2005-10-10 20:48                         ` Guennadi Liakhovetski
2005-10-11 21:31                       ` Guennadi Liakhovetski
2005-10-11 21:58                         ` Peter Osterlund
2005-10-15 15:36                           ` Peter Osterlund
2005-10-17 21:11                             ` Guennadi Liakhovetski

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=m3hdc4ucrt.fsf@telia.com \
    --to=petero2@telia.com \
    --cc=axboe@suse.de \
    --cc=g.liakhovetski@gmx.de \
    --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