1. 06 Feb, 2008 2 commits
    • Nick Piggin's avatar
      inotify: remove debug code · 0d71bd59
      Nick Piggin authored
      
      The inotify debugging code is supposed to verify that the
      DCACHE_INOTIFY_PARENT_WATCHED scalability optimisation does not result in
      notifications getting lost nor extra needless locking generated.
      
      Unfortunately there are also some races in the debugging code.  And it isn't
      very good at finding problems anyway.  So remove it for now.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Robert Love <rlove@google.com>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: Yan Zheng <yanzheng@21cn.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0d71bd59
    • Nick Piggin's avatar
      inotify: fix race · d599e36a
      Nick Piggin authored
      
      There is a race between setting an inode's children's "parent watched" flag
      when placing the first watch on a parent, and instantiating new children of
      that parent: a child could miss having its flags set by
      set_dentry_child_flags, but then inotify_d_instantiate might still see
      !inotify_inode_watched.
      
      The solution is to set_dentry_child_flags after adding the watch.  Locking is
      taken care of, because both set_dentry_child_flags and inotify_d_instantiate
      hold dcache_lock and child->d_locks.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Robert Love <rlove@google.com>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: Yan Zheng <yanzheng@21cn.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d599e36a
  2. 21 Oct, 2007 2 commits
  3. 08 May, 2007 1 commit
    • Pavel Emelianov's avatar
      Introduce a handy list_first_entry macro · b5e61818
      Pavel Emelianov authored
      
      There are many places in the kernel where the construction like
      
         foo = list_entry(head->next, struct foo_struct, list);
      
      are used.
      The code might look more descriptive and neat if using the macro
      
         list_first_entry(head, type, member) \
                   list_entry((head)->next, type, member)
      
      Here is the macro itself and the examples of its usage in the generic code.
       If it will turn out to be useful, I can prepare the set of patches to
      inject in into arch-specific code, drivers, networking, etc.
      Signed-off-by: default avatarPavel Emelianov <xemul@openvz.org>
      Signed-off-by: default avatarKirill Korotaev <dev@openvz.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Zach Brown <zach.brown@oracle.com>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Ram Pai <linuxram@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b5e61818
  4. 04 Dec, 2006 1 commit
  5. 20 Jun, 2006 4 commits
  6. 21 May, 2006 2 commits
  7. 11 Apr, 2006 1 commit
  8. 28 Mar, 2006 1 commit
  9. 26 Mar, 2006 1 commit
  10. 25 Mar, 2006 1 commit
    • Nick Piggin's avatar
      [PATCH] inotify: lock avoidance with parent watch status in dentry · c32ccd87
      Nick Piggin authored
      
      Previous inotify work avoidance is good when inotify is completely unused,
      but it breaks down if even a single watch is in place anywhere in the
      system.  Robin Holt notices that udev is one such culprit - it slows down a
      512-thread application on a 512 CPU system from 6 seconds to 22 minutes.
      
      Solve this by adding a flag in the dentry that tells inotify whether or not
      its parent inode has a watch on it.  Event queueing to parent will skip
      taking locks if this flag is cleared.  Setting and clearing of this flag on
      all child dentries versus event delivery: this is no in terms of race
      cases, and that was shown to be equivalent to always performing the check.
      
      The essential behaviour is that activity occuring _after_ a watch has been
      added and _before_ it has been removed, will generate events.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Robert Love <rml@novell.com>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c32ccd87
  11. 23 Mar, 2006 2 commits
  12. 08 Feb, 2006 1 commit
  13. 19 Jan, 2006 1 commit
  14. 12 Dec, 2005 1 commit
  15. 09 Nov, 2005 1 commit
  16. 23 Oct, 2005 1 commit
    • Andrew Morton's avatar
      [PATCH] inotify/idr leak fix · 8d3b3591
      Andrew Morton authored
      
      Fix a bug which was reported and diagnosed by
      Stefan Jones <stefan.jones@churchillrandoms.co.uk>
      
      IDR trees include a cache of idr_layer objects.  There's no way to destroy
      this cache, so when we discard an overall idr tree we end up leaking some
      memory.
      
      Add and use idr_destroy() for this.  v9fs and infiniband also need to use
      idr_destroy() to avoid leaks.
      
      Or, we make the cache global, like radix_tree_preload().  Which is probably
      better.  Later.
      
      Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: Robert Love <rml@novell.com>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      8d3b3591
  17. 07 Sep, 2005 2 commits
  18. 26 Aug, 2005 1 commit
  19. 15 Aug, 2005 1 commit
  20. 01 Aug, 2005 1 commit
  21. 26 Jul, 2005 7 commits
  22. 13 Jul, 2005 3 commits
    • Robert Love's avatar
      [PATCH] inotify: misc cleanup · 9a556e89
      Robert Love authored
      
      Really simple, basic cleanup.
      Signed-off-by: default avatarRobert Love <rml@novell.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9a556e89
    • Robert Love's avatar
      [PATCH] inotify: move sysctl · 0399cb08
      Robert Love authored
      
      This moves the inotify sysctl knobs to "/proc/sys/fs/inotify" from
      "/proc/sys/fs".  Also some related cleanup.
      Signed-off-by: default avatarRobert Love <rml@novell.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0399cb08
    • Robert Love's avatar
      [PATCH] inotify · 0eeca283
      Robert Love authored
      
      inotify is intended to correct the deficiencies of dnotify, particularly
      its inability to scale and its terrible user interface:
      
              * dnotify requires the opening of one fd per each directory
                that you intend to watch. This quickly results in too many
                open files and pins removable media, preventing unmount.
              * dnotify is directory-based. You only learn about changes to
                directories. Sure, a change to a file in a directory affects
                the directory, but you are then forced to keep a cache of
                stat structures.
              * dnotify's interface to user-space is awful.  Signals?
      
      inotify provides a more usable, simple, powerful solution to file change
      notification:
      
              * inotify's interface is a system call that returns a fd, not SIGIO.
      	  You get a single fd, which is select()-able.
              * inotify has an event that says "the filesystem that the item
                you were watching is on was unmounted."
              * inotify can watch directories or files.
      
      Inotify is currently used by Beagle (a desktop search infrastructure),
      Gamin (a FAM replacement), and other projects.
      
      See Documentation/filesystems/inotify.txt.
      Signed-off-by: default avatarRobert Love <rml@novell.com>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0eeca283