Re: Floppy handling

From: Adam Sampson (azz@gnu.org)
Date: Sun Jun 11 2000 - 07:10:00 EST


On Thu, Jun 08, 2000 at 11:45:52PM -0600, Richard Stallman wrote:
> Is there any possibility of making Linux handle file systems on floppies
> like MSDOS, so that there is no need to explicitly mount and unmount a
> floppy drive in order to access floppies through the file system?

This could possibly be done by creating a userspace FS. Unfortunately, Linux
doesn't have a userspace filesystem interface yet, although there is at
least one implementation (podfuk) that works by emulating the userspace
portion of a network filesystem (in this case coda).

The way I'd like to see it working would be like Hurd's translators; any
user could do something like

mount -t userfs none /floppy -o "handler=/bin/floppyhandler /dev/fd0"

assuming they had write permissions on /floppy, and then operations on
/floppy/whatever would be passed to floppyhandler to deal with. (An instance
of floppyhandler would be started upon mount and shut down upon umount; I
don't know what the preferred way of communicating between the handler and
the kernel would be.) floppyhandler could then use the mtools libraries to
read/write the floppy. If the floppy has been removed, the appropriate
system calls could just return EIO. (It might be interesting to see what
Windows' POSIX interface does in this case.)

This would allow non-kernel hackers (like RMS and me) to easily write
filesystems; I can think of several that I'd like to implement (urlfs,
cvsfs, cdparanoiafs, applications that export their internal state as a
filesystem Plan 9-style). It would also allow the resulting filesystem
handlers to be easily portable across operating systems, assuming that the
same interface could be implemented elsewhere.

Ideas? This is the feature that I would most like to see in 2.5. ;)

-- 

Adam Sampson azz@gnu.org

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:26 EST