Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-20 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 9:46 AM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: >> An I am very happy that you used filehandles to keep track of objects >> in your example, because it fits my proposal really well. > > you can

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-20 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 9:46 AM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: >> An I am very happy that you used filehandles to keep track of objects >> in your example, because it fits my proposal really well. > > you can read more about the

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-16 Thread Jan Kara
On Wed 15-03-17 16:34:11, Amir Goldstein wrote: > On Wed, Mar 15, 2017 at 4:05 PM, Jan Kara wrote: > >> So the string fields in my proposal are optional. > >> userspace opts-in to get them by specifying the FAN_EVENT_INFO_NAME flag: > >> > >> fanotify_init(FAN_CLOEXEC |

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-16 Thread Jan Kara
On Wed 15-03-17 16:34:11, Amir Goldstein wrote: > On Wed, Mar 15, 2017 at 4:05 PM, Jan Kara wrote: > >> So the string fields in my proposal are optional. > >> userspace opts-in to get them by specifying the FAN_EVENT_INFO_NAME flag: > >> > >> fanotify_init(FAN_CLOEXEC | FAN_CLASS_NOTIF | >

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-15 Thread Amir Goldstein
On Wed, Mar 15, 2017 at 4:05 PM, Jan Kara wrote: > Hello, > > On Tue 14-03-17 12:11:40, Amir Goldstein wrote: >> > Add a new fanotify event, FAN_MODIFY_DIR, that is emitted whenever the >> > contents of a directory change (a directory entry is added, removed or >> > renamed). This

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-15 Thread Amir Goldstein
On Wed, Mar 15, 2017 at 4:05 PM, Jan Kara wrote: > Hello, > > On Tue 14-03-17 12:11:40, Amir Goldstein wrote: >> > Add a new fanotify event, FAN_MODIFY_DIR, that is emitted whenever the >> > contents of a directory change (a directory entry is added, removed or >> > renamed). This covers all the

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-15 Thread Jan Kara
Hello, On Tue 14-03-17 12:11:40, Amir Goldstein wrote: > > Add a new fanotify event, FAN_MODIFY_DIR, that is emitted whenever the > > contents of a directory change (a directory entry is added, removed or > > renamed). This covers all the currently missing events: rename, unlink, > > mknod,

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-15 Thread Jan Kara
Hello, On Tue 14-03-17 12:11:40, Amir Goldstein wrote: > > Add a new fanotify event, FAN_MODIFY_DIR, that is emitted whenever the > > contents of a directory change (a directory entry is added, removed or > > renamed). This covers all the currently missing events: rename, unlink, > > mknod,

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Michael Kerrisk
[CC += linux-...@vger.kernel.org] Filip, Since this is a kernel-user-space API change, please CC linux-api@ (and on future iterations of this patch). The kernel source file Documentation/SubmitChecklist notes that all Linux kernel patches that change userspace interfaces should be CCed to

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Michael Kerrisk
[CC += linux-...@vger.kernel.org] Filip, Since this is a kernel-user-space API change, please CC linux-api@ (and on future iterations of this patch). The kernel source file Documentation/SubmitChecklist notes that all Linux kernel patches that change userspace interfaces should be CCed to

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 4:48 PM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 03:55:19PM +0200, Amir Goldstein wrote: >> Please let me know if that is sufficient for your needs >> or if you need me to prepare a version that delivers filename events >> without

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 4:48 PM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 03:55:19PM +0200, Amir Goldstein wrote: >> Please let me know if that is sufficient for your needs >> or if you need me to prepare a version that delivers filename events >> without filename info, therefore

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 3:46 PM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: >> An I am very happy that you used filehandles to keep track of objects >> in your example, because it fits my proposal really well. > > you can

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 3:46 PM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: >> An I am very happy that you used filehandles to keep track of objects >> in your example, because it fits my proposal really well. > > you can read more about the

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Filip Štědronský
Hi, On Tue, Mar 14, 2017 at 03:55:19PM +0200, Amir Goldstein wrote: > Please let me know if that is sufficient for your needs > or if you need me to prepare a version that delivers filename events > without filename info, therefore allowing to merge filename events. > > Sounds to me like if you

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Filip Štědronský
Hi, On Tue, Mar 14, 2017 at 03:55:19PM +0200, Amir Goldstein wrote: > Please let me know if that is sufficient for your needs > or if you need me to prepare a version that delivers filename events > without filename info, therefore allowing to merge filename events. > > Sounds to me like if you

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 2:41 PM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:11:40PM +0200, Amir Goldstein wrote: >> > - file system indexers / desktop search tools >> > - file synchronization tools (like Dropbox, Nextcloud, etc.), >> > online backup

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 2:41 PM, Filip Štědronský wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:11:40PM +0200, Amir Goldstein wrote: >> > - file system indexers / desktop search tools >> > - file synchronization tools (like Dropbox, Nextcloud, etc.), >> > online backup tools >> >> This last

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Filip Štědronský
Hi, On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: > An I am very happy that you used filehandles to keep track of objects > in your example, because it fits my proposal really well. you can read more about the rationales in the WIP draft of my thesis (especially the chapter

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Filip Štědronský
Hi, On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: > An I am very happy that you used filehandles to keep track of objects > in your example, because it fits my proposal really well. you can read more about the rationales in the WIP draft of my thesis (especially the chapter

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Filip Štědronský
Hi, On Tue, Mar 14, 2017 at 12:11:40PM +0200, Amir Goldstein wrote: > > - file system indexers / desktop search tools > > - file synchronization tools (like Dropbox, Nextcloud, etc.), > > online backup tools > > This last one is the use case of my employer, Ctera Networks. > Out of

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Filip Štědronský
Hi, On Tue, Mar 14, 2017 at 12:11:40PM +0200, Amir Goldstein wrote: > > - file system indexers / desktop search tools > > - file synchronization tools (like Dropbox, Nextcloud, etc.), > > online backup tools > > This last one is the use case of my employer, Ctera Networks. > Out of

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 1:16 AM, Filip Štědronský wrote: > An example userspace program that uses FAN_MODIFY_DIR to reliably keep > an up-to-date internal representation of the file system. It uses some > filehandle trickery to identify inodes, other heuristics could be also >

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 1:16 AM, Filip Štědronský wrote: > An example userspace program that uses FAN_MODIFY_DIR to reliably keep > an up-to-date internal representation of the file system. It uses some > filehandle trickery to identify inodes, other heuristics could be also > used. > An I am

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 1:02 AM, Filip Štědronský wrote: > Fanotify currently does not report directory modification events > (rename, unlink, etc.). But these events are essential for about half of > concievable fanotify use cases, especially: > > - file system indexers /

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 1:02 AM, Filip Štědronský wrote: > Fanotify currently does not report directory modification events > (rename, unlink, etc.). But these events are essential for about half of > concievable fanotify use cases, especially: > > - file system indexers / desktop search tools

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-13 Thread Filip Štědronský
An example userspace program that uses FAN_MODIFY_DIR to reliably keep an up-to-date internal representation of the file system. It uses some filehandle trickery to identify inodes, other heuristics could be also used. --- //#define _GNU_SOURCE #include #include #include #include #include

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-13 Thread Filip Štědronský
An example userspace program that uses FAN_MODIFY_DIR to reliably keep an up-to-date internal representation of the file system. It uses some filehandle trickery to identify inodes, other heuristics could be also used. --- //#define _GNU_SOURCE #include #include #include #include #include

[RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-13 Thread Filip Štědronský
Fanotify currently does not report directory modification events (rename, unlink, etc.). But these events are essential for about half of concievable fanotify use cases, especially: - file system indexers / desktop search tools - file synchronization tools (like Dropbox, Nextcloud, etc.),

[RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-13 Thread Filip Štědronský
Fanotify currently does not report directory modification events (rename, unlink, etc.). But these events are essential for about half of concievable fanotify use cases, especially: - file system indexers / desktop search tools - file synchronization tools (like Dropbox, Nextcloud, etc.),