> when a disk or a cdrom reports that it has 0 sectors
> devsd won't let you write to the control file.  it gives

this is not true.  what is true is that if you open
the ctl file and then the media changes, then you
are required to reopen the ctl file in order to start
using it.  this is true of all the disk files.

> first, if you have a blank cdrom in the tray, you can't
> 
>       echo dma on>/dev/sdXX/ctl

i can't test this, but i don't believe this is true.
(see above.)

> worse, if i have a drive that sometimes needs to be reset
> manually.  (some sata drives have loopy firmware.)  i can't
> 
>       echo reset>/dev/sdE5/ctl
> 
> to fix it. 

i *know* this isn't true.  i do this all the time (personally i think
the sdmv driver is not quite driving the disks right).

since ctl is used for things like partitioning the disk, i think
it is reasonable that if the disk has changed since you 
opened the file, then you should need to reopen it.

i do find it annoying that when i reset a disk this way,
it appears to the sd framework as if the underlying
disk has changed, so all the partitions go away, and
all the open file descriptors get poisoned, but i'm not
sure this is incorrect behavior.  the media did sort of
change -- it went away and came back.

in venti i have worked around this by reloading the
partition table and then reopening the file descriptors,
but that's admittedly a pain.  

russ

Reply via email to