public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andy Polyakov <appro@fy.chalmers.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.69-70 ide-cd to guarantee fault-free CD/DVD burning experience?
Date: Wed, 4 Jun 2003 21:55:46 +0200	[thread overview]
Message-ID: <20030604195546.GB477@suse.de> (raw)
In-Reply-To: <3EDE4B96.21DBA04B@fy.chalmers.se>

On Wed, Jun 04 2003, Andy Polyakov wrote:
> > ... accept ... patch which makes it possible to access the
> > sense data returned by IDE CD/DVD units from user-land with SG_IO ioctl.
> 
> The originally proposed modifications were indeed sufficient to get
> DVD+RW units working, but apparently not DVD-RW ones:-( Note though
> that [another] problem discussed here is not specific to DVD-RW
> recordings. It's generic bug/deficiency. Once a packet commands is
> terminated with an error condition the whole bio should be purged at
> once and not only the first chunk as it's currently implemented.
> 
> Attached patch should be considered as a "denoting" patch, not
> "final." Well, because it was verified with single application,
> growisofs of dvd+rw-tools, which uses mmap-ed, in other words 
> page-aligned, buffer(s). I mean I'm not 100% sure if hard_nr_sectors
> is appropriate even for general case of 4-byte aligned buffers...
> Then if-statement should probably be extended even to REQ_PC case...
> 
> Cheers. A.
> 8<--------8<--------8<--------8<--------8<--------8<--------8<--------
> --- ./drivers/ide/ide-cd.c.orig Tue Jun  3 12:21:56 2003
> +++ ./drivers/ide/ide-cd.c      Wed Jun  4 16:14:41 2003
> @@ -657,6 +657,9 @@
>         struct request *rq = HWGROUP(drive)->rq;
>         int nsectors = rq->hard_cur_sectors;
>  
> +       if (rq->flags&REQ_BLOCK_PC)
> +               nsectors = rq->hard_nr_sectors;	/* purge it all ... */
> +       else
>         if ((rq->flags & REQ_SENSE) && uptodate) {
>                 /*
>                  * For REQ_SENSE, "rq->buffer" points to the original failed

The *sector* values don't really work well for REQ_BLOCK_PC, it doesn't
even have to be set at all. One solution would be to add more rq members
(yuck), a nicer one is probably to make cdrom_end_request return
ide_end_request ret value, and simply make the error locations kill the
requests... It's not very nice, but should work.

-- 
Jens Axboe


  reply	other threads:[~2003-06-04 19:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28  7:41 2.5.69-70 ide-cd to guarantee fault-free CD/DVD burning experience? Andy Polyakov
2003-05-28  7:48 ` Jens Axboe
2003-05-28  7:52   ` Jens Axboe
2003-05-28 16:42   ` Andy Polyakov
2003-05-28 17:03     ` Jens Axboe
2003-05-29 13:50       ` Andy Polyakov
2003-05-29 17:33         ` Jens Axboe
2003-05-28  7:49 ` Jens Axboe
2003-06-04 19:42 ` Andy Polyakov
2003-06-04 19:55   ` Jens Axboe [this message]
2003-06-05 21:05     ` Andy Polyakov

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=20030604195546.GB477@suse.de \
    --to=axboe@suse.de \
    --cc=appro@fy.chalmers.se \
    --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