Re: 2.9test9-mm1 and DAO ATAPI cd-burning corrupt

Pascal Schmidt
2003-11-12T18:20:18Z

On Tue, 11 Nov 2003, Linus Torvalds wrote:

> Does it work if you change the order of those two things in ide-cd.c (or
> just remove the call to "cdrom_get_last_written()" entirely, so that it
> always just does the sane thing).

I've moved the cdrom_read_capacity() to the top of cdrom_read_toc and
now the capacity gets set correctly and everything seems to work just
fine.

dd to and from the raw device works, as do mke2fs and e2fsck. I could
also mount the disk read-write, write a 10MB file to it, and umount
again without problems. Then I rebooted into 2.4 and verified that the
filesystem is okay and the 10MB file made it to disk correctly.

Lookin' good so far.

Now, assuming there is a reason that the cdrom_read_capacity() function
is only used as a fallback for normal ide-cd devices, my change might
break non-MO devices. I also don't know what to do when read_capacity
fails - setting capacity to 0 obviously breaks as we've seen before,
so maybe setting it to the lowest possible MO size (128M) would be a
good way to handle that situation.

Jens, what do you think?

--
Ciao,
Pascal