Re: Floppy Handling

From: James Sutherland (jas88@cam.ac.uk)
Date: Wed Jun 14 2000 - 15:59:08 EST


On Wed, 14 Jun 2000, Jacques Richer wrote:
>
> > Not sure I like that, TBH. We shouldn't go filling up the user's disk with
> > caches unless we really need to - I'd much rather use the free swap space
> > for this.
> >
>
> Your approach seems better to me for floppies, I agree. Unfortunately,
> if you extend this to CDROM (650mb...) you can easily blow up the
> machine by running out of VM. Many of the machines I run here do not
> have more than 500mb or so of swap space, and use very little of
> that...

That's why I said FREE VM space :-)

Better to have the free space containing a cache of the CD ROM than have
it unused, generally, IMO?

> > > 2) By putting the floppy disk drive handling code in user space, we can
> > > steal ^H^H^H^H^H borrow large pieces of the mtools libs and avoid
> > > reinventing the wheel. At least that code is stable.
> >
> > I suspect the kernel's floppy handling code is stable too ;-)
>
> This was not meant as a knock to the kernel FDD code. (I have never
> had any trouble with it.)

I know!

> I was simply pointing out that the mtools libs would probably require
> less rewrite than grabbing pieces out of the msdos filesystem code in
> the kernel. I may be wrong. If so, please correct me.

I suspect it would be easier to do this by tweaking the kernel code. Make
the floppy driver cache a bit more aggressively into VM, and add a hook
for a userspace daemon to detect disk changes. That's it, kernel-side,
AFAICT.

Then the userspace daemon needs to do the hard work: figuring out who to
shout at for pulling a disk we're using. (Or just umount the FS if the
disk is synced.)

> I was thinking of hooks into the vfs layer to work with a user-space
> deamon. This way, we can put the necessary code into userland and if
> it's done carefully a crash of the userland daemod would be
> recoverable. This is just conceptual, as I am not terribly familiar
> with the vfs code.

I think we can avoid changing VFS at all - just a userspace daemon to
umount the FS or shout at the user as needed, and a small hook in the
floppy driver.

I haven't heard from anyone who's looked at this yet - is anyone else
interested in this??

James.

-
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:33 EST