Funny you should mention this !
> However, I have noticed that I can also eject the disk under these
> conditions:
> mount -t ext2 /dev/hdc1 /sy
> dd if=/dev/hdc1 of=/dev/null count=1
> Now the eject button causes the drive to spin down even though
> /dev/hdc1 is still mounted.
There was another problem with removable media in both the ide and scsi
disk drivers. When the device is closed with ide_release or sd_release,
the driver doesn't wait for the sync to complete before unlocking the
door. Under some circumstances, this can result in the disk being ejected
before writing has completed. Not good.
I was working on a patch for that problem when I noticed that the ide
driver does not maintain an access count, as the scsi driver does. I
wondered whether that was also a problem, and now you have confirmed it -
one day later :-)
> I think that some sort of checking needs to be added in
> drivers/block/ide.c:ide_open() and :ide_release(), perhaps a counter that
> is incremented and then decremented. However, I haven't looked at the code
> too closely, and I'm not sure exactly when ide_release() gets called.
I think I agree that this is what should be done. Mark ?
--------------------------------------------------------------------------
Grant R. Guenther grant@torque.net
--------------------------------------------------------------------------