public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Erik Andersen <andersen@codepoet.org>
To: Zinx Verituse <zinx@epicsol.org>
Cc: lkml <linux-kernel@vger.kernel.org>, Jens Axboe <axboe@suse.de>
Subject: Re: ide-cd.c, "MEDIUM_ERROR" handling
Date: Tue, 18 Apr 2006 10:54:34 -0600	[thread overview]
Message-ID: <20060418165434.GA27182@codepoet.org> (raw)
In-Reply-To: <20060418011839.GA10619@atlantis.chaos>

On Mon Apr 17, 2006 at 08:18:39PM -0500, Zinx Verituse wrote:
> I recently bought a DVD drive which appears to not retry enough when it's
> having trouble reading a disc - I'm requesting an option (or changing the
> default behavior) so that this drive is actually usable with the Linux
> ide-cd drivers - specificly, the code:
> 	} else if (sense_key == MEDIUM_ERROR) {
> 		/* No point in re-trying a zillion times on a bad
> 		 * sector...  If we got here the error is not correctable */
> 		ide_dump_status (drive, "media error (bad sector)", stat);
> 		do_end_request = 1;
> 	}
> needs to be disabled for my drive to read CDs properly.

When I originally added this code, the problem I was seeing was
the ide layer was doing 8 retires before it returned to ide-cd,
which then did 8 retries itself.  Thus processing a bad sector
caused no less than 64 reads of the bad sector, all of which
failed, and each of which took a fair amount of time, thereby
keeping user space stuck in D state for over 10 minutes on a
single syscall, which seemed rather bad form...

When I added this code, I was relying on the ide layer to
continue to do its ritualistic 8 retries, after which I assumed
that no further retries would be likely to help and there was no
reason for ide-cd to keep thrashing on the already proven to be
dead sector.  For my purposes, this helped considerably reduce
the amount of time stuck in D state while processing CDs with bad
sectors (such as trying to recover the data off my kid's
massively scratched up game CDs).

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

      parent reply	other threads:[~2006-04-18 16:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18  1:18 ide-cd.c, "MEDIUM_ERROR" handling Zinx Verituse
2006-04-18 11:04 ` Alan Cox
2006-04-18 15:20 ` Gunther Mayer
2006-04-18 16:54 ` Erik Andersen [this message]

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=20060418165434.GA27182@codepoet.org \
    --to=andersen@codepoet.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zinx@epicsol.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