[ENBD] Re: problems with floppy
P.T. Breuer
ptb at it.uc3m.es
Thu Dec 25 14:43:17 MST 2003
In article <200312172331.hBHNVkX17211 at oboe.it.uc3m.es> you wrote:
> "Also sprach Patryk Lesiewicz:"
> > I'm trying to use enbd to share the floppy, and the problem is, that when I
> > run enbd-client there my floppy is continuosly busy. Even if I don't mount
> It's not busy all the time, only every few seconds. The server spends
> its spare time opening and closing the floppy device, because the
> kernel only bothers to find out if there is a floppy there or not when
> somebody does significant operations like opening or closing and so on.
I've (as an experiment in enbd 2.4.32), tried passing the kernel's
media_check command across to the server using the remote ioctl
operation.
But the kernel only seems to call the driver's check_media function on a
mount of the device, not on open or close of the device, as advertised
in the kernel code:
/*
* This routine checks whether a removable media has been changed,
* and invalidates all buffer-cache-entries in that case. This
* is a relatively slow routine, so we have to try to minimize using
* it. Thus it is called only upon a 'mount' or ópen'. This
* is the best way of combining speed and utility, I think.
* People changing diskettes in the middle of an operation deserve
* to lose :-)
*/
int check_disk_change(kdev_t dev)
This is a major disappointment! I suspect much of the removable device
support in the kernel may be fubar really.
Can somebody confirm that you can change a floppy without the kernel
noticing, provided you don't umount and remount the device? You'll have
to read some file, swap the floppy, then read it again.
Yes - I long ago ran out of machines with working floppies!
I may well be able to implement a media check on open or close myself,
in the driver.. hmmm. Probably a race condition, like that for reading
the partition table, which I gave up on and left as a "fundamental
kernel problem"?
Peter
More information about the ENBD
mailing list