1. 27 7月, 2011 1 次提交
  2. 08 6月, 2011 1 次提交
  3. 26 5月, 2011 3 次提交
  4. 20 5月, 2011 2 次提交
  5. 22 3月, 2011 2 次提交
  6. 10 3月, 2011 1 次提交
  7. 05 3月, 2011 1 次提交
  8. 04 3月, 2011 3 次提交
  9. 20 2月, 2011 1 次提交
  10. 13 1月, 2011 1 次提交
    • S
      ceph: add dir_layout to inode · 6c0f3af7
      Sage Weil 提交于
      Add a ceph_dir_layout to the inode, and calculate dentry hash values based
      on the parent directory's specified dir_hash function.  This is needed
      because the old default Linux dcache hash function is extremely week and
      leads to a poor distribution of files among dir fragments.
      Signed-off-by: NSage Weil <sage@newdream.net>
      6c0f3af7
  11. 07 1月, 2011 6 次提交
    • N
      fs: rcu-walk aware d_revalidate method · 34286d66
      Nick Piggin 提交于
      Require filesystems be aware of .d_revalidate being called in rcu-walk
      mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning
      -ECHILD from all implementations.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      34286d66
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      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: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: dcache remove dcache_lock · b5c84bf6
      Nick Piggin 提交于
      dcache_lock no longer protects anything. remove it.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b5c84bf6
    • N
      fs: dcache scale subdirs · 2fd6b7f5
      Nick Piggin 提交于
      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: NNick Piggin <npiggin@kernel.dk>
      2fd6b7f5
    • N
      fs: dcache scale d_unhashed · da502956
      Nick Piggin 提交于
      Protect d_unhashed(dentry) condition with d_lock. This means keeping
      DCACHE_UNHASHED bit in synch with hash manipulations.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      da502956
    • N
      fs: dcache scale dentry refcount · b7ab39f6
      Nick Piggin 提交于
      Make d_count non-atomic and protect it with d_lock. This allows us to ensure a
      0 refcount dentry remains 0 without dcache_lock. It is also fairly natural when
      we start protecting many other dentry members with d_lock.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b7ab39f6
  12. 18 12月, 2010 1 次提交
  13. 02 12月, 2010 1 次提交
  14. 19 11月, 2010 1 次提交
  15. 12 11月, 2010 2 次提交
  16. 21 10月, 2010 3 次提交
    • S
      ceph: do not carry i_lock for readdir from dcache · efa4c120
      Sage Weil 提交于
      We were taking dcache_lock inside of i_lock, which introduces a dependency
      not found elsewhere in the kernel, complicationg the vfs locking
      scalability work.  Since we don't actually need it here anyway, remove
      it.
      
      We only need i_lock to test for the I_COMPLETE flag, so be careful to do
      so without dcache_lock held.
      Signed-off-by: NSage Weil <sage@newdream.net>
      efa4c120
    • S
      ceph: do not hide .snap in root directory · 4c32f5dd
      Sage Weil 提交于
      Snaps in the root directory are now supported by the MDS, and harmless on
      older versions.
      Signed-off-by: NSage Weil <sage@newdream.net>
      4c32f5dd
    • Y
      ceph: factor out libceph from Ceph file system · 3d14c5d2
      Yehuda Sadeh 提交于
      This factors out protocol and low-level storage parts of ceph into a
      separate libceph module living in net/ceph and include/linux/ceph.  This
      is mostly a matter of moving files around.  However, a few key pieces
      of the interface change as well:
      
       - ceph_client becomes ceph_fs_client and ceph_client, where the latter
         captures the mon and osd clients, and the fs_client gets the mds client
         and file system specific pieces.
       - Mount option parsing and debugfs setup is correspondingly broken into
         two pieces.
       - The mon client gets a generic handler callback for otherwise unknown
         messages (mds map, in this case).
       - The basic supported/required feature bits can be expanded (and are by
         ceph_fs_client).
      
      No functional change, aside from some subtle error handling cases that got
      cleaned up in the refactoring process.
      Signed-off-by: NSage Weil <sage@newdream.net>
      3d14c5d2
  17. 12 9月, 2010 1 次提交
    • S
      ceph: fix null pointer deref on anon root dentry release · ca04d9c3
      Sage Weil 提交于
      When we release a root dentry, particularly after a splice, the parent
      (actually our) inode was evaluating to NULL and was getting dereferenced
      by ceph_snap().  This is reproduced by something as simple as
      
       mount -t ceph monhost:/a/b mnt
       mount -t ceph monhost:/a mnt2
       ls mnt2
      
      A splice_dentry() would kill the old 'b' inode's root dentry, and we'd
      crash while releasing it.
      
      Fix by checking for both the ROOT and NULL cases explicitly.  We only need
      to invalidate the parent dir when we have a correct parent to invalidate.
      Signed-off-by: NSage Weil <sage@newdream.net>
      ca04d9c3
  18. 25 8月, 2010 1 次提交
  19. 04 8月, 2010 1 次提交
  20. 02 8月, 2010 1 次提交
  21. 24 7月, 2010 1 次提交
    • S
      ceph: fix d_release dop for snapdir, snapped dentries · 252af521
      Sage Weil 提交于
      We need to set the d_release dop for snapdir and snapped dentries so that
      the ceph_dentry_info struct gets released.  We also use the dcache to
      cache readdir results when possible, which only works if we know when
      dentries are dropped from the cache.  Since we don't use the dcache for
      readdir in the hidden snapdir, avoid that case in ceph_dentry_release.
      Signed-off-by: NSage Weil <sage@newdream.net>
      252af521
  22. 23 7月, 2010 1 次提交
  23. 30 5月, 2010 1 次提交
    • J
      fs/ceph: Use ERR_CAST · 7e34bc52
      Julia Lawall 提交于
      Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)).  The former makes more
      clear what is the purpose of the operation, which otherwise looks like a
      no-op.
      
      In the case of fs/ceph/inode.c, ERR_CAST is not needed, because the type of
      the returned value is the same as the type of the enclosing function.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      type T;
      T x;
      identifier f;
      @@
      
      T f (...) { <+...
      - ERR_PTR(PTR_ERR(x))
      + x
       ...+> }
      
      @@
      expression x;
      @@
      
      - ERR_PTR(PTR_ERR(x))
      + ERR_CAST(x)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NSage Weil <sage@newdream.net>
      7e34bc52
  24. 28 5月, 2010 1 次提交
  25. 18 5月, 2010 2 次提交