lkml.org 
[lkml]   [2003]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.9test9-mm1 and DAO ATAPI cd-burning corrupt
On Thu, Nov 13 2003, Linus Torvalds wrote:
>
> On Thu, 13 Nov 2003, Jens Axboe wrote:
>
> > On Thu, Nov 13 2003, Pascal Schmidt wrote:
> > >
> > > My patch from yesterday should handle that situation.
> > > cdrom_get_last_written is allowed to override the capacity from
> > > cdrom_read_capacity.
> >
> > Yep, that is fine.
>
> Well, there is a good argument for not bothering with the
> "cdrom_get_last_written" at all: the SCSI layer never does anything like
> that as far as I can see, so arguably everybody who ever used ide-scsi
> would only ever have seen the READ_CAPACITY command be used. And nobody
> ever complained about bad capacitites as far as I can remember..
>
> But I might have missed something in the SCSI driver. But I actually see a
>
> if (cdrom_get_last_written(..)
>
> in sr.c, and it's been #if 0'ed out since before the Bitkeeper tree
> started. And that code definitely does the READ_CAPACITY first.
>
> The "sd.c" code (which is what a MO device would use) obviously doesn't do
> cdrom_get_last_written either - it just does a READ_CAPACITY. (Well, it
> does a READ_CAPACITY_16 if it hits a really big disk, but that only hits
> if the disk has more than 4G sectors, so we can ignore it for CD-ROM's for
> a while.
>
> So I'd argue for just dropping the cdrom_get_last_written() call entirely.

Your argument isn't very good, imo. I was the one that added the
cdrom_get_last_written() calls, because with the pktcdvd written media
reading the toc or using READ_CAPACITY just didn't work.

For MO drives, DVD-RAM, and that sort of thing there's no argument -
read capacity is the way to go. For CDROMs it's not so clear.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.263 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site