Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600428

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

From Filip Štědronský <r.lkml@regnarg.cz>
Newsgroups linux.kernel
Subject Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR
Date 2017-03-14 15:00 +0100
Message-ID <tkV9w-Uf-5@gated-at.bofh.it> (permalink)
References <tkHgd-808-1@gated-at.bofh.it> <tkHpT-85V-1@gated-at.bofh.it> <tkSbE-7fP-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 Identifying Inodes and its surroundings):

    http://regnarg.cz/tmp/thesis.pdf
    https://github.com/regnarg/bc

Either way, one can never use pathnames as identifiers because in
a world with parallel renames on multiple levels of the hierarchy
(between which no ordering is guaranteed unless they are cross-dir),
pathnames are not even a well-defined concept.

NB: I used a simple script for testing that does precisely this
(a lot of parallel within-directory renames at many levels):
    https://github.com/regnarg/bc/blob/master/experiments/fanotify/parallel_renamist.sh
It seems like a good stress test for any application that tries to
do reliable filesystem monitoring.

> See, if you used my proposed API, you would have had
> 
>       fan_fd = CHK(fanotify_init(FAN_UNLIMITED_QUEUE| \
>                              FAN_EVENT_INFO_PARENT | FAN_EVENT_INFO_FH,
>                              O_RDONLY));

Sure, I'll definitely try to implement your interface as an
optional backend and mention it in my thesis and definitely
give it some heavy testing.

> Furthermore, my proposal records the filehandle at the time of the event
> and therefore, does not have to keep an elevated refcount of the object
> in the events queue.

That sounds good but from what I've understood,  not all
filesystems support handles. Is this a concern? (Maybe the
right answer is to extend handle support...)

Filip

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 1/2] fanotify: new event FAN_MODIFY_DIR Filip Štědronský <r.lklm@regnarg.cz> - 2017-03-14 00:10 +0100
  Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Filip Štědronský <r.lklm@regnarg.cz> - 2017-03-14 00:20 +0100
    Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Amir Goldstein <amir73il@gmail.com> - 2017-03-14 11:50 +0100
      Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Filip Štědronský <r.lkml@regnarg.cz> - 2017-03-14 15:00 +0100
        Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Amir Goldstein <amir73il@gmail.com> - 2017-03-14 16:10 +0100
        Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Amir Goldstein <amir73il@gmail.com> - 2017-03-20 13:20 +0100
  [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Filip Štědronský <r.lklm@regnarg.cz> - 2017-03-14 00:20 +0100
    Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Amir Goldstein <amir73il@gmail.com> - 2017-03-14 12:20 +0100
      Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Filip Štědronský <r.lkml@regnarg.cz> - 2017-03-14 16:00 +0100
        Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Amir Goldstein <amir73il@gmail.com> - 2017-03-14 16:40 +0100
        Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Marko Rauhamaa <marko.rauhamaa@f-secure.com> - 2017-03-15 09:50 +0100
          Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Jan Kara <jack@suse.cz> - 2017-03-15 14:50 +0100
            Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Marko Rauhamaa <marko.rauhamaa@f-secure.com> - 2017-03-15 15:20 +0100
            Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Amir Goldstein <amir73il@gmail.com> - 2017-03-15 15:50 +0100
      Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Jan Kara <jack@suse.cz> - 2017-03-19 11:20 +0100
        Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Filip Štědronský <r.lkml@regnarg.cz> - 2017-03-19 11:50 +0100
          Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Jan Kara <jack@suse.cz> - 2017-03-20 12:20 +0100
            Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Amir Goldstein <amir73il@gmail.com> - 2017-03-20 12:50 +0100
            Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Filip Štědronský <r.lkml@regnarg.cz> - 2017-03-20 13:00 +0100
        Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes bfields@fieldses.org (J. Bruce Fields) - 2017-03-21 16:50 +0100
          Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Jan Kara <jack@suse.cz> - 2017-03-21 17:50 +0100
            Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes "J. Bruce Fields" <bfields@fieldses.org> - 2017-03-21 18:50 +0100
  Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Amir Goldstein <amir73il@gmail.com> - 2017-03-14 11:20 +0100
    Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Filip Štědronský <r.lkml@regnarg.cz> - 2017-03-14 13:50 +0100
      Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Amir Goldstein <amir73il@gmail.com> - 2017-03-14 15:00 +0100
        Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Filip Štědronský <r.lkml@regnarg.cz> - 2017-03-14 16:00 +0100
          Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Amir Goldstein <amir73il@gmail.com> - 2017-03-14 23:40 +0100
    Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Jan Kara <jack@suse.cz> - 2017-03-15 15:10 +0100
      Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Amir Goldstein <amir73il@gmail.com> - 2017-03-15 15:40 +0100
        Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Jan Kara <jack@suse.cz> - 2017-03-16 11:40 +0100
  Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Michael Kerrisk <mtk.manpages@gmail.com> - 2017-03-15 06:00 +0100

csiph-web