Skip to content
Snippets Groups Projects
  1. Oct 07, 2014
    • Jeff Layton's avatar
      locks: plumb a "priv" pointer into the setlease routines · e6f5c789
      Jeff Layton authored
      
      In later patches, we're going to add a new lock_manager_operation to
      finish setting up the lease while still holding the i_lock.  To do
      this, we'll need to pass a little bit of info in the fcntl setlease
      case (primarily an fasync structure). Plumb the extra pointer into
      there in advance of that.
      
      We declare this pointer as a void ** to make it clear that this is
      private info, and that the caller isn't required to set this unless
      the lm_setup specifically requires it.
      
      Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      e6f5c789
  2. Sep 09, 2014
  3. Jun 04, 2014
  4. Nov 16, 2013
  5. Nov 09, 2013
  6. Oct 25, 2013
  7. Jul 14, 2013
  8. Jun 29, 2013
  9. Dec 20, 2012
  10. Dec 18, 2012
  11. Sep 05, 2012
  12. Jul 14, 2012
  13. May 11, 2012
    • Linus Torvalds's avatar
      vfs: make it possible to access the dentry hash/len as one 64-bit entry · 26fe5750
      Linus Torvalds authored
      
      This allows comparing hash and len in one operation on 64-bit
      architectures.  Right now only __d_lookup_rcu() takes advantage of this,
      since that is the case we care most about.
      
      The use of anonymous struct/unions hides the alternate 64-bit approach
      from most users, the exception being a few cases where we initialize a
      'struct qstr' with a static initializer.  This makes the problematic
      cases use a new QSTR_INIT() helper function for that (but initializing
      just the name pointer with a "{ .name = xyzzy }" initializer remains
      valid, as does just copying another qstr structure).
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      26fe5750
  14. Apr 09, 2012
    • Al Viro's avatar
      dentry leak in simple_fill_super() failure exit · 640946f2
      Al Viro authored
      
      d_genocide() does _not_ evict dentries; it just removes extra ref
      pinning each of those.  Normally it's followed by shrinking the
      tree (it's done just before generic_shutdown_super() by kill_litter_super()),
      but in case of simple_fill_super() nothing of that kind will follow.
      Just do shrink_dcache_parent() manually.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      640946f2
  15. Apr 05, 2012
  16. Mar 21, 2012
  17. Feb 29, 2012
  18. Jan 04, 2012
  19. Nov 02, 2011
  20. Jul 22, 2011
  21. Jul 21, 2011
    • Josef Bacik's avatar
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik authored
      
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  22. Jul 20, 2011
    • Al Viro's avatar
      Make ->d_sb assign-once and always non-NULL · a4464dbc
      Al Viro authored
      
      New helper (non-exported, fs/internal.h-only): __d_alloc(sb, name).
      Allocates dentry, sets its ->d_sb to given superblock and sets
      ->d_op accordingly.  Old d_alloc(NULL, name) callers are converted
      to that (all of them know what superblock they want).  d_alloc()
      itself is left only for parent != NULl case; uses __d_alloc(),
      inserts result into the list of parent's children.
      
      Note that now ->d_sb is assign-once and never NULL *and*
      ->d_parent is never NULL either.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      a4464dbc
    • Akinobu Mita's avatar
      fs/libfs.c: fix simple_attr_write() on 32bit machines · f7b88631
      Akinobu Mita authored
      
      Assume that /sys/kernel/debug/dummy64 is debugfs file created by
      debugfs_create_x64().
      
      	# cd /sys/kernel/debug
      	# echo 0x1234567812345678 > dummy64
      	# cat dummy64
      	0x0000000012345678
      
      	# echo 0x80000000 > dummy64
      	# cat dummy64
      	0xffffffff80000000
      
      A value larger than INT_MAX cannot be written to the debugfs file created
      by debugfs_create_u64 or debugfs_create_x64 on 32bit machine.  Because
      simple_attr_write() uses simple_strtol() for the conversion.
      
      To fix this, use simple_strtoll() instead.
      
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f7b88631
  23. May 26, 2011
  24. Jan 13, 2011
  25. Jan 07, 2011
    • Nick Piggin's avatar
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin authored
      
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      fb045adb
    • Nick Piggin's avatar
      fs: dcache remove dcache_lock · b5c84bf6
      Nick Piggin authored
      
      dcache_lock no longer protects anything. remove it.
      
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      b5c84bf6
    • Nick Piggin's avatar
      fs: dcache scale subdirs · 2fd6b7f5
      Nick Piggin authored
      
      Protect d_subdirs and d_child with d_lock, except in filesystems that aren't
      using dcache_lock for these anyway (eg. using i_mutex).
      
      Note: if we change the locking rule in future so that ->d_child protection is
      provided only with ->d_parent->d_lock, it may allow us to reduce some locking.
      But it would be an exception to an otherwise regular locking scheme, so we'd
      have to see some good results. Probably not worthwhile.
      
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      2fd6b7f5
    • Nick Piggin's avatar
      fs: dcache scale d_unhashed · da502956
      Nick Piggin authored
      
      Protect d_unhashed(dentry) condition with d_lock. This means keeping
      DCACHE_UNHASHED bit in synch with hash manipulations.
      
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      da502956
    • Nick Piggin's avatar
      fs: change d_delete semantics · fe15ce44
      Nick Piggin authored
      
      Change d_delete from a dentry deletion notification to a dentry caching
      advise, more like ->drop_inode. Require it to be constant and idempotent,
      and not take d_lock. This is how all existing filesystems use the callback
      anyway.
      
      This makes fine grained dentry locking of dput and dentry lru scanning
      much simpler.
      
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      fe15ce44
  26. Oct 29, 2010
  27. Oct 26, 2010
  28. Sep 10, 2010
Loading