Hi Stef, I am terribly sorry, I should have mentioned you and your contribution in the cover letter for the patches. It was not intentional, but a mistake from my part and I take full responsibility for it. I am very new to this whole process and I make a lot of mistakes. You are correct, we have been in contact with you in the past about your "Fsnotify-and-FUSE" post https://github.com/libfuse/libfuse/wiki/Fsnotify-and-FUSE and you also kindly provided your initial patches for FUSE fsnotify and shared some concerns/limitations of the implementation with us. We also have stumbled upon these limitations during our implementation and discussed them in these patch series. You also informed us then that you were already working on an out of band notification approach. Both the Wiki and patches have been a big inspiration for our own RFC patches, especially in the case where we have to decide which data we should transmit between the FUSE server (virtiofsd) and client (QEMU guest). I do not have an official/public link to cite your patches here so you can reply to this email if you want and post a link to your patches. To support inotify/fsnotify in virtiofs we had to take a slightly different implementation route, albeit with many limitations. Our main goal with the RFC patches was to get insights from the kernel developers on how to proceed with our project. Our implementation will change further based on what Amir and Jan have already proposed. I am sorry again for not giving you the credit you deserve. Thanks, Ioannis On Tue, Nov 16, 2021 at 12:10 AM Stef Bon wrote: > Hi Ioannis, > > I see that you have been working on making fsnotify work on virtiofs. > Earlier you contacted me since I've written this: > > https://github.com/libfuse/libfuse/wiki/Fsnotify-and-FUSE > > and send you my patches on 23 june. > I want to mention first that I would have appreciated it if you would > have reacted to me after I've sent you my patches. I did not get any > reaction from you. Maybe these patches (which differ from what you > propose now, but there is also a lot in common) have been an > inspiration for you. > > Second, what I've written about is that with network filesystems (eg a > backend shared with other systems) fsnotify support in FUSE has some > drawbacks. > In a network environment, where a network fs is part of making people > collaborate, it's very useful to have information on who did what on > which host, and also when. Simply a message "a file has been created > in the folder you watch" is not enough. For example, if you are part > of a team, and assigned to your team is a directory on a server where > you can work on some shared documents. Now in this example there is a > planning, and some documents have to be written. In that case you want > to be informed that someone in your team has started a document (by > creating it) by the system. > > This "extended" information will never get through fsnotify. > > Other info useful to you as team member: > > - you have become member of another team: sbon@anotherteam.example.org > - diskspace and/or quota shortage reported by networksystem > - new teammember, teammember left > - your "rights" or role in the network/team have been changed (for > example from reader to reader and writer to some documents) > > What I want to say is that in a network where lots of people work > together in teams/projects, (and I want Linux to play a role there, as > desktop/workstation) communication is very important, and all these > messages should be supported by the system. My idea is the support of > watching fs events with FUSE filesystems should go through userspace, > and not via the kernel (cause fs events are part of your setup in the > network, together with all other tools to make people collaborate like > chat/call/text, and because mentioned above extended info about the > who on what host etc is not supported by fsnotify). > There should be a fs event watcher which takes care of all watches on > behalf of applications during a session, similar to gamin and FAM once > did (not used anymore?). > When receiving a request from one of the applications this fsevent > watcher will use inotify and/or fanotify for local fs's only. With a > FUSE fs, it should contact (via a socket) this fs that a watch has > been set on an inode with a certain mask. > If the FUSE fs does not support this, fallback on normal inotify/fanotify. > This way extended info is possible. > > Is this extended information also useful for virtiofs? > > Stef Bon > > -- Ioannis Angelakopoulos Software Engineer Intern at Red Hat