linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* formatting CD-RW locks the system
@ 2005-04-10 18:29 Stas Sergeev
  2005-04-10 20:36 ` Alistair John Strachan
  0 siblings, 1 reply; 6+ messages in thread
From: Stas Sergeev @ 2005-04-10 18:29 UTC (permalink / raw)
  To: Linux kernel

Hello.

I am trying to format the CD-RW disc
on my NEC ND-3520A DVD writer, and the
results are completely unexpected: I do
cdrwtool -d /dev/cdrom -q
It proceeds with the formatting, but
while it does so, the system is pretty
much dead. It can do some trivial tasks
like the console switching, but as soon
as it comes to any disc I/O, the processes
are hanging. After the formatting is done,
the system is back alive. That reminds me
formatting the floppies under DOS in those
ancient times, with the only difference
that formatting a floppy takes ~2 minutes,
while formatting a CD-RW takes ~20 minutes,
which is not good at all.
Is this something known or a bug?
I tried that on a 2.6.11-rc3-mm2 and
on a 2.6.12-rc1 kernels.

Also, is there any way to use the
packet writing with the CD-R/DVD-R discs,
or is it supposed to work only with the
-RW discs?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: formatting CD-RW locks the system
  2005-04-10 18:29 formatting CD-RW locks the system Stas Sergeev
@ 2005-04-10 20:36 ` Alistair John Strachan
  2005-04-11  1:21   ` Gene Heskett
  2005-04-11  3:24   ` Stas Sergeev
  0 siblings, 2 replies; 6+ messages in thread
From: Alistair John Strachan @ 2005-04-10 20:36 UTC (permalink / raw)
  To: Stas Sergeev, Linux kernel

On Sunday 10 Apr 2005 19:29, you wrote:
> Hello.
>
> I am trying to format the CD-RW disc
> on my NEC ND-3520A DVD writer, and the
> results are completely unexpected: I do
> cdrwtool -d /dev/cdrom -q
> It proceeds with the formatting, but
> while it does so, the system is pretty
> much dead. It can do some trivial tasks
> like the console switching, but as soon
> as it comes to any disc I/O, the processes
> are hanging. After the formatting is done,
> the system is back alive. That reminds me
> formatting the floppies under DOS in those
> ancient times, with the only difference
> that formatting a floppy takes ~2 minutes,
> while formatting a CD-RW takes ~20 minutes,
> which is not good at all.
> Is this something known or a bug?
> I tried that on a 2.6.11-rc3-mm2 and
> on a 2.6.12-rc1 kernels.
>
> Also, is there any way to use the
> packet writing with the CD-R/DVD-R discs,
> or is it supposed to work only with the
> -RW discs?

You probably don't have DMA enabled on the drive. Please check this.

CDRW formatting works fine here with cdrecord blank=all

-- 
Cheers,
Alistair.

personal:   alistair()devzero!co!uk
university: s0348365()sms!ed!ac!uk
student:    CS/CSim Undergraduate
contact:    1F2 55 South Clerk Street,
            Edinburgh. EH8 9PP.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: formatting CD-RW locks the system
  2005-04-10 20:36 ` Alistair John Strachan
@ 2005-04-11  1:21   ` Gene Heskett
  2005-04-11  3:24   ` Stas Sergeev
  1 sibling, 0 replies; 6+ messages in thread
From: Gene Heskett @ 2005-04-11  1:21 UTC (permalink / raw)
  To: linux-kernel

On Sunday 10 April 2005 16:36, Alistair John Strachan wrote:
>On Sunday 10 Apr 2005 19:29, you wrote:
>> Hello.
>>
>> I am trying to format the CD-RW disc
>> on my NEC ND-3520A DVD writer, and the
>> results are completely unexpected: I do
>> cdrwtool -d /dev/cdrom -q
>> It proceeds with the formatting, but
>> while it does so, the system is pretty
>> much dead. It can do some trivial tasks
>> like the console switching, but as soon
>> as it comes to any disc I/O, the processes
>> are hanging. After the formatting is done,
>> the system is back alive. That reminds me
>> formatting the floppies under DOS in those
>> ancient times, with the only difference
>> that formatting a floppy takes ~2 minutes,
>> while formatting a CD-RW takes ~20 minutes,
>> which is not good at all.
>> Is this something known or a bug?
>> I tried that on a 2.6.11-rc3-mm2 and
>> on a 2.6.12-rc1 kernels.
>>
>> Also, is there any way to use the
>> packet writing with the CD-R/DVD-R discs,
>> or is it supposed to work only with the
>> -RW discs?
>
>You probably don't have DMA enabled on the drive. Please check this.
>
>CDRW formatting works fine here with cdrecord blank=all

Excuse me, but did I miss a major left turn in the operations of a 
disk control system here someplace?

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.  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.

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?

Scsi drives have been reporting the success of the formatting 
operation in just a few milliseconds for even longer simply because 
they take care of their own errors long before the os is aware the 
drive may be having problems?  The last time I formatted a scsi drive 
under nitros9, the format took 10 milliseconds, but the logical 
installation of the filesystem took another 3 hours, mainly because 
nitros9 uses a 256 byte sector.

Its possible the cd-rw folks seem to have fallen off the wagon here, 
but really, a disk operating system (and the average cd-rw or dvd-rw 
drive should be capable of doing that with no further intervention 
from the OS itself unless you want some sort of a non-standard 
formatting done as in the nitros0 situation.

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.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: formatting CD-RW locks the system
  2005-04-10 20:36 ` Alistair John Strachan
  2005-04-11  1:21   ` Gene Heskett
@ 2005-04-11  3:24   ` Stas Sergeev
  1 sibling, 0 replies; 6+ messages in thread
From: Stas Sergeev @ 2005-04-11  3:24 UTC (permalink / raw)
  To: Alistair John Strachan; +Cc: Linux kernel

Hello.

Alistair John Strachan wrote:
> You probably don't have DMA enabled on the drive. Please check this.
It looks enabled. And even if it didn't,
such a behaviour would still be strange.

# hdparm -v /dev/cdrom

/dev/cdrom:
 HDIO_GET_MULTCOUNT failed: Invalid argument
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Invalid argument

> CDRW formatting works fine here with cdrecord blank=all
OK, I'll try cdrecord too, thanks.
But there might be a bug in the kernel
if the system literally dies with the
cdrwtool.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: formatting CD-RW locks the system
       [not found]   ` <3RVUD-7td-9@gated-at.bofh.it>
@ 2005-04-11 16:33     ` Bodo Eggert
  0 siblings, 0 replies; 6+ messages in thread
From: Bodo Eggert @ 2005-04-11 16:33 UTC (permalink / raw)
  To: Gene Heskett, linux-kernel

Gene Heskett <gene.heskett@verizon.net> 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@0riginals.net elq@amnszmarw.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: formatting CD-RW locks the system
       [not found]   ` <3RXML-BZ-15@gated-at.bofh.it>
@ 2005-04-11  4:03     ` Robert Hancock
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Hancock @ 2005-04-11  4:03 UTC (permalink / raw)
  To: linux-kernel

Stas Sergeev wrote:
> OK, I'll try cdrecord too, thanks.
> But there might be a bug in the kernel
> if the system literally dies with the
> cdrwtool.

If the format is being done as a single blocking ATAPI command, then 
that will definitely block any other accesses on the same IDE channel, 
at least - that's just the way IDE works. That shouldn' have an effect 
on other IDE channels though..

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-04-11 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-10 18:29 formatting CD-RW locks the system Stas Sergeev
2005-04-10 20:36 ` Alistair John Strachan
2005-04-11  1:21   ` Gene Heskett
2005-04-11  3:24   ` Stas Sergeev
     [not found] <3RPvT-2g8-31@gated-at.bofh.it>
     [not found] ` <3RRo1-3O4-21@gated-at.bofh.it>
     [not found]   ` <3RXML-BZ-15@gated-at.bofh.it>
2005-04-11  4:03     ` Robert Hancock
     [not found]   ` <3RVUD-7td-9@gated-at.bofh.it>
2005-04-11 16:33     ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).