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


Groups > linux.kernel > #1603935

Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes

From Filip Štědronský <r.lkml@regnarg.cz>
Newsgroups linux.kernel
Subject Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes
Date 2017-03-19 11:50 +0100
Message-ID <tmGzn-4lF-5@gated-at.bofh.it> (permalink)
References <tkHgd-808-1@gated-at.bofh.it> <tkHpT-85V-5@gated-at.bofh.it> <tkSEG-7LJ-25@gated-at.bofh.it> <tmG6m-49u-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Mar 19, 2017 at 11:19:43AM +0100, Jan Kara wrote:
> However if you can really call fsnotify hooks with 'path' available in all
> the places, it should be equally hard to just pass 'path' to
> vfs_(create|mkdir|...) and that way we don't have to sprinkle fsnotify
> calls into several call sites but keep them local to vfs_(create|mkdir|...)
> helpers. Hmm?

the problem is: not absolutely all. One illuminating example is the use
of vfs_mknod in devtmpfs. There a struct path is not only unavailable
but makes not semantic sense: the changes do not go thru any mountpoint.
And in general I think there will be situations where you would need
to call VFS functions without paths.

Thus I suggested either
(a) wrapping the VFS functions with path variants, or
(b) giving them an optional vfsmount argument that can be set to NULL
    when it does not make sense

Filip

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


Thread

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

csiph-web