1. 03 4月, 2014 1 次提交
    • Y
      ceph: fix ceph_dir_llseek() · f0494206
      Yan, Zheng 提交于
      Comparing offset with inode->i_sb->s_maxbytes doesn't make sense for
      directory. For a fragmented directory, offset (frag_t, off) can be
      larger than inode->i_sb->s_maxbytes.
      
      At the very beginning of ceph_dir_llseek(), local variable old_offset
      is initialized to parameter offset. This doesn't make sense neither.
      Old_offset should be ceph_make_fpos(fi->frag, fi->next_offset).
      Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
      Reviewed-by: NAlex Elder <elder@linaro.org>
      f0494206
  2. 18 2月, 2014 2 次提交
  3. 30 1月, 2014 1 次提交
  4. 21 1月, 2014 1 次提交
  5. 01 1月, 2014 1 次提交
  6. 01 10月, 2013 1 次提交
  7. 10 8月, 2013 1 次提交
  8. 29 6月, 2013 1 次提交
  9. 02 5月, 2013 2 次提交
    • Y
      ceph: use i_release_count to indicate dir's completeness · 2f276c51
      Yan, Zheng 提交于
      Current ceph code tracks directory's completeness in two places.
      ceph_readdir() checks i_release_count to decide if it can set the
      I_COMPLETE flag in i_ceph_flags. All other places check the I_COMPLETE
      flag. This indirection introduces locking complexity.
      
      This patch adds a new variable i_complete_count to ceph_inode_info.
      Set i_release_count's value to it when marking a directory complete.
      By comparing the two variables, we know if a directory is complete
      Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
      2f276c51
    • Y
      ceph: use I_COMPLETE inode flag instead of D_COMPLETE flag · a8673d61
      Yan, Zheng 提交于
      commit c6ffe100 moved the flag that tracks if the dcache contents
      for a directory are complete to dentry. The problem is there are
      lots of places that use ceph_dir_{set,clear,test}_complete() while
      holding i_ceph_lock. but ceph_dir_{set,clear,test}_complete() may
      sleep because they call dput().
      
      This patch basically reverts that commit. For ceph_d_prune(), it's
      called with both the dentry to prune and the parent dentry are
      locked. So it's safe to access the parent dentry's d_inode and
      clear I_COMPLETE flag.
      Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
      Reviewed-by: NGreg Farnum <greg@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      a8673d61
  10. 23 2月, 2013 1 次提交
  11. 18 12月, 2012 1 次提交
  12. 03 8月, 2012 1 次提交
    • S
      ceph: simplify+fix atomic_open · 5ef50c3b
      Sage Weil 提交于
      The initial ->atomic_open op was carried over from the old intent code,
      which was incomplete and didn't really work.  Replace it with a fresh
      method.  In particular:
      
       * always attempt to do an atomic open+lookup, both for the create case
         and for lookups of existing files.
       * fix symlink handling by returning 1 to the VFS so that we can follow
         the link to its destination. This fixes a longstanding ceph bug (#2392).
      Signed-off-by: NSage Weil <sage@inktank.com>
      5ef50c3b
  13. 31 7月, 2012 1 次提交
  14. 14 7月, 2012 9 次提交
  15. 03 2月, 2012 1 次提交
    • A
      ceph: create a new session lock to avoid lock inversion · d8fb02ab
      Alex Elder 提交于
      Lockdep was reporting a possible circular lock dependency in
      dentry_lease_is_valid().  That function needs to sample the
      session's s_cap_gen and and s_cap_ttl fields coherently, but needs
      to do so while holding a dentry lock.  The s_cap_lock field was
      being used to protect the two fields, but that can't be taken while
      holding a lock on a dentry within the session.
      
      In most cases, the s_cap_gen and s_cap_ttl fields only get operated
      on separately.  But in three cases they need to be updated together.
      Implement a new lock to protect the spots updating both fields
      atomically is required.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Reviewed-by: NSage Weil <sage@newdream.net>
      d8fb02ab
  16. 13 1月, 2012 1 次提交
  17. 11 1月, 2012 2 次提交
  18. 04 1月, 2012 4 次提交
  19. 30 12月, 2011 1 次提交
    • S
      ceph: disable use of dcache for readdir etc. · a4d46363
      Sage Weil 提交于
      Ceph attempts to use the dcache to satisfy negative lookups and readdir
      when the entire directory contents are in cache.  Disable this behavior
      until lingering bugs in this code are shaken out; we'll re-enable these
      hooks once things are fully stable.
      Signed-off-by: NSage Weil <sage@newdream.net>
      a4d46363
  20. 08 12月, 2011 1 次提交
    • S
      ceph: use i_ceph_lock instead of i_lock · be655596
      Sage Weil 提交于
      We have been using i_lock to protect all kinds of data structures in the
      ceph_inode_info struct, including lists of inodes that we need to iterate
      over while avoiding races with inode destruction.  That requires grabbing
      a reference to the inode with the list lock protected, but igrab() now
      takes i_lock to check the inode flags.
      
      Changing the list lock ordering would be a painful process.
      
      However, using a ceph-specific i_ceph_lock in the ceph inode instead of
      i_lock is a simple mechanical change and avoids the ordering constraints
      imposed by igrab().
      Reported-by: NAmon Ott <a.ott@m-privacy.de>
      Signed-off-by: NSage Weil <sage@newdream.net>
      be655596
  21. 12 11月, 2011 1 次提交
    • S
      ceph: initialize root dentry · 774ac21d
      Sage Weil 提交于
      Set up d_fsdata on the root dentry.  This fixes a NULL pointer dereference
      in ceph_d_prune on umount.  It also means we can eventually strip out all
      of the conditional checks on d_fsdata because it is now set unconditionally
      (prior to setting up the d_ops).
      
      Fix the ceph_d_prune debug print while we're here.
      Signed-off-by: NSage Weil <sage@newdream.net>
      774ac21d
  22. 06 11月, 2011 1 次提交
  23. 04 11月, 2011 1 次提交
  24. 27 7月, 2011 3 次提交