Nowdays the users have thousands files on their filesystem's. Exists toools like find/grep/locate/slocate & exists thing/api's like inotify/dnotify. Example, i remember that i want file which holds text "Perpetum" but i don't rememeber where is stored (in worst case on which of my 5 computers). I could try "find / -exec grep "Perpetum" \; and wait for several minutes/hours. I think that we have "stupid approach" to files, like slocate/locate. Indexing services which kill's computers because the try to index files via "full scan" of filesystem and kills the system via I/O.
My idea is simple.
Modify Linux kerenel ( i am not kernel developer ) on VFS level to store 2 new numbers,word (FILE_GROUP_TYPE_xxxx & FILE_TYPE_xxxx ) for each file and create new call "set/get_file_type". For exmple when gimps create's jpeg sets set_file_type(int handle, FILE_GROUP_TYPE_IMAGES, FILE_TYPE_JPEG); Second step is to modify inotify/dnotify or create new mechanism to populate "changes/events" from kernel space to userspace. This API allows me and others to create "thousands" of plugins/daemons/scripts like indexers, mail convertors, mail backupers.media convertors and whatever you want to do or better utilize existing tools.
Exapmple one.
Somebody creates indexd (userspace daemon) which "catch" from kernel via "dnotify/inotify/new_api" event new file created. and store this info to memory ( inode,name,group_type,file_type). The next step is to modify "find" or create new "tool" to find files ...
find --file_type=FILE_TYPE_JPEG ... which respons in miliseconds instead of minutes.
Example two:
Via kernel_api i register "new script" on folder "convert_to_flash". I wrote my "script" which convers .avi -> .flv So when user do cp /media/disk/file0001.avi /home/user/convert_to_flash systems automaticaly do conversion on the fly to .flv even better user for example in nautilus do drag and drop to this folder.
Example three:
Unix admin want to know how many shared objects files hold his file system ? find --file_type FILE_TYPE_SO | wc -l
Example four:
Imagine i have mounted xx TB filesystem which holds thousands of files and i want to find some file. During mount ( my system catch event "NEW_MOUNT" populate this for example via DBUS ? and because i have my new "indexd" deamon, this daemon try to contacts "indexd" on remote machine after successfull mount. So when i want to find file i have chance to find this file across all mounted filesystems :-).
Example five:
In unix is everithing file .. so dev/sda4 has FILE_GROUP_TYPE_FILESYSTEM, FILE_TYPE_EXT4 ..
Benefits ?
No stupid background indexers like slocate/locate and others which kills your notebook/machine in worst time of day. Every user loves situation when he need to do something, but his notebook do huge amount I/O operations because of "
( user space daemon which index "FILE_GROUP_DOCUMENTS" files on the fly)
Incredible fast searching via "new find".
When i want to search document which hol'd text "
Indexers which will try index YOUR DOCUMENTS' via FILE_TYPE_ID not 400GB of yours MP3's. And so on.
I know that this idea should be posted to kerenel developers but i am not kernel developer and from my point of view i don't know how to contact them.