This forum has been archived. All content is frozen. Please use KDE Discuss instead.
The Discussions and Opinions forum is a place for open discussion regarding everything related to KDE, within the boundaries of KDE Code of Conduct. If you have a question or need a solution for a KDE problem, please post in the apppropriate forum instead.

Thinking about developing a new fsnotify service.

Tags: None
(comma "," separated)
bonassis
Registered Member
Posts
59
Karma
0
OS
Hi,

I'm using KDE for years, and very happy. But as developer of FUSE filesystems, I run into problems concerning fam and gamin. KDE is still using gamin if it's installed.

I'm thinking about developing a new filesystem service, based on a FUSE fs.
My idea is to let applications connect to the service via a socket to receive events.

Applications can set a "watch" by using extended attributes like:

(if an application is interested n changes in /home/user for example)

mkdir %FUSEROOTDIR%/home
mkdir %FUSEROOTDIR%/home/user

setfattr --name=system.notifyfs_mask --value %somemask% %FUSEROOTDIR%/home/user

The fs now determines based upon configuration and methods set at runtime the method to use, like inotify, polling or another method on the underlying fs.

Because the fuse fs can detect the pid of the app seting the xattr, it will send the events it receives on the underlying fs to the richt socket.

My idea is to make it to use default methiods, which can be changed per path using extended attributes like system.notifyfs_method(_global) or something like that.

There is one process required instead of one per usersession when using gamin.

I beleive that the other desktop (Gnome) is already using something else than gamin.

Anyone thinking this is a good idea?? Please comment, also when not positive.

Stef Bon
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I would recommend sending such ideas to the kde-core-devel@kde.org or kde-devel@kde.org mailing list. However, it might be better for you to work on adding new API at the kernel level which works natively instead of as a FUSE based file system (which would seem to be a hack as such)


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
bonassis
Registered Member
Posts
59
Karma
0
OS
Right, thanks for the tip.

About the kernel, I've recently tried to add a patch:

http://marc.info/?l=linux-fsdevel&m=132594443515129&w=2

It was not accepted, for reasons mentioned there. It's too complicated and racy.
The best option to develop a better userspace solution.

Stef
bonassis
Registered Member
Posts
59
Karma
0
OS
And I would like to add that the way I want to program it (using a FUSE fs) is not a hack, at least the way I consider it. I've come to the conclusion that handling fs notify in a good manner for apps in userspace has to be done in userspace, not in the kernel. And the FUSE api offers a lot of flexibilty and possibilities out of the box, like handling of xattributes.

I've posted already on kde-core-devel. My post is awaiting aproval. Where can I subscribe?

Stef Bon
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Subscription can be handled through https://mail.kde.org/mailman/listinfo/kde-core-devel.
I believe all new subscribers are moderated as well however for their first few posts.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
beamlester
Registered Member
Posts
1
Karma
0
i m new user in kde it,s a very good software for use any one help me correctly how it is use :(


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]