Idea for new kernel driver

Will Weisser (kased811@ix.netcom.com)
Thu, 24 Jun 1999 02:44:12 -0400


Hello,

This is my first time posting to this list, so excuse any accidental
abuse of ettiquite. I wanted to air an idea here for a filesystem driver which
I think would be REALLY useful in Linux...SGI has something similar with their
famd daemon (maybe something like this already exists in which case disregard
this message :-)).

A friend and I were discussing (on IRC, of course), the various flaws
in the design of the UNIX operating system and how they might be addressed. We
both agreed that what would be really useful would be a device that monitors
files for changes. For example, a process writes to /dev/foobar the name of a
file, then whenever that file has a write or lock operating performed on it, the
process is notified with the name of the file and what operation was performed.
It's a simple concept, but when you consider the overhead of monitoring
multiple files in user space I think it's definitely worth doing. My thinking
is that it would require hooks into the vfs code and thus changes to the kernel
proper (a.k.a. way too advanced for me to do). The practical advantages of
something like this are tremendous...I realize that no application has been
written that can handle this kind of functionality (duh!), but there's no
reason this stuff couldn't be put into a stable kernel release for the new file
managers to implement now. This kind of stuff would make file managers work SO
much better on Linux, and in time hopefully people would incorporate this sort
of thing into editors or any program which uses a config file. Even lpd or
cron could benefit. Picture Linux having Mac-like functionality in its GUI, or
viewing a file with less and having it update changes automatically.

The important thing is that if it is done, it isn't a half-assed
version with broken functionality. The driver needs to be able to monitor a
directory for changes in all its files (so that file managers could be notified
when a new file is created)., as well as single or groups of files for
write/lock/unlock/open/close operations. Ideally you should be able to access
the data with a normal select/read or a mmap. I'm sure you intrepid kernel
hackers can think of even better features.

Well, that's my proposal...sorry to make something like this without
code to back it up, but like I said, I'm barely learning how to write modules.
If something like this were written and adopted in say, the GNOME project, then
I and every other Linux user would be indebted to you. Thanks for taking the
time to read this and thanks for the great kernel ;-).

Sincerely,

Will Weisser

-
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/