Re: formatting CD-RW locks the system

From: Bodo Eggert
Date: Mon Apr 11 2005 - 11:42:52 EST


Gene Heskett <gene.heskett@xxxxxxxxxxx> wrote:

> Every disk system I have ever delt with, has as a default, (and I've
> walked around in a couple of them at the assembly language level) the
> assumption that if track 0 is to be formatted, then the whole device
> is assumed to be needing formatted, and every filesystem I've ever
> screwed with will do exactly that.

There is one "new" filesystem you should screw with:

$ echo foo > test
$ mkisofs test > /dev/fd0h1440
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 21000
175 extents written (0 Mb)
$ fdformat -n /dev/fd0h1440
Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB.
Formatting ... 0
(press ^C after writing most of the first track, hexdump will show
blocks of 0xf6)
$ mount /dev/fd0h1440 /z -t iso9660
$ cat /z/test
foo
$

> Often, but not always, that can
> actually be offloaded to the device itself if its smart enough, and
> the operating system itself can go on about its business, whether its
> you composing a letter to your aunt Tilly or whatever.

This would require a) the device being smart enough and b) the bus
being smart enough.

> IDE/ATAPI drives have been cheerfully ignoreing format messages from
> the OS now for what, 12 years now unless backed up by super secret
> code word access to such builtin functions of the drive, only
> possessed by the factory technicians who do have the tools to control
> the track spaceings and data densities on the surfaces etc etc?

That's because in contrast to floppy media and CD/RW, the tracks on
HDD don't need reformating. Floppy drives suffer from aging sector
headers, and CD/RW will AFAIK suffer from a loss in writing quality.

> Are the firmwares of modern cd/dvd writers actualy dumb enough they
> need the OS's help for that? If the answer is yes, lord help us.

They need to report success. This would require delaying the end of the
operation till the formating has finished. ATAPI is dumb enough to block
the bus during that time. Off cause you could implement SCSI disconnect
for IDE, but that would be too easy.
--
Top 100 things you don't want the sysadmin to say:
31. I hate it when that happens.

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