Messages in this thread | | | Subject | Re: CD-RW as a normal hard disk? | Date | Fri, 13 Nov 1998 10:41:06 +0100 (MET) | From | (Rogier Wolff) |
| |
David Woodhouse wrote: > > mandree@dosis.uni-dortmund.de said: > > Please note that CD-RW don't have as many read/write cycles per block > > as hard disks have, you will probably very soon lose your > > administration blocks on your CD - which is basically why you don't > > use ext2/fat/whatever is normally used on hard disks. CD-RW is > > probably not meant as a hard drive replacement anyways. > > Nonetheless, it should be possible, shouldn't it? > > Does that the Linux SCSI code has to be tricked into presenting it as a DASD, > rather than as a CD-ROM? Or can it just be done with 'mkfs.ext2 /dev/sr0'?
mke2fs crashes when it first tries to write the superblock, because there is a "if (open_mode & FLAGS_WRITE) return -EROFS;" in sr_open.
And I just found: case WRITE: SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); goto repeat; break; Which is the "error abort" in case of a write.
For my DVD-RAM, I added: if ((vendor == MY_VENDOR) && (device == MY_DEVICE) && (devtype == CDROM)) devtype = HARDDISK;
to SCSI.c , but this should be extended to use a table-based "correction table".
Still, the question is why do we still have a "sr" driver? It seems that harddisks can be "changed" now, and have doorlock support. My guess is that only the audio ioctls are unique to cdroms.
The sr driver seems to have a lot in common with the "sd" driver. But also a lot of stuff that looks like bugfixes are in one but not the other.
Roger.
-- | Most people would die sooner than think.... | R.E.Wolff@BitWizard.nl | in fact, most do. -- Bertrand Russsell | phone: +31-15-2137555 We write Linux device drivers for any device you may have! fax: ..-2138217
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |