Re: [RFC][PATCH 0/7] Mount, FS, Block and Keyrings notifications
From: Amir Goldstein <amir73il@gmail.com>
Date: 2019-05-29 15:53:39
Also in:
keyrings, linux-api, linux-block, linux-fsdevel, lkml
quoted
David, I am interested to know how you envision filesystem notifications would look with this interface. fanotify can certainly benefit from providing a ring buffer interface to read events. From what I have seen, a common practice of users is to monitor mounts (somehow) and place FAN_MARK_MOUNT fanotify watches dynamically. It'd be good if those users can use a single watch mechanism/API for watching the mount namespace and filesystem events within mounts. A similar usability concern is with sb_notify and FAN_MARK_FILESYSTEM. It provides users with two complete different mechanisms to watch error and filesystem events. That is generally not a good thing to have. I am not asking that you implement fs_notify() before merging sb_notify() and I understand that you have a use case for sb_notify(). I am asking that you show me the path towards a unified API (how a typical program would look like), so that we know before merging your new API that it could be extended to accommodate fsnotify events where the final result will look wholesome to users.Are you sure we want to combine notification about file changes etc. with administrator-type notifications about the filesystem? To me these two sound like rather different (although sometimes related) things.
Well I am sure that ring buffer for fanotify events would be useful, so seeing that David is proposing a generic notification mechanism, I wanted to know how that mechanism could best share infrastructure with fsnotify. But apart from that I foresee the questions from users about why the mount notification API and filesystem events API do not have better integration. The way I see it, the notification queue can serve several classes of notifications and fsnotify could be one of those classes (at least FAN_CLASS_NOTIF fits nicely to the model). Thanks, Amir.