1. 19 2月, 2015 3 次提交
    • Y
      ceph: return error for traceless reply race · 4d41cef2
      Yan, Zheng 提交于
      When we receives traceless reply for request that created new inode,
      we re-send a lookup request to MDS get information of the newly created
      inode. (VFS expects FS' callback return an inode in create case)
      This breaks one request into two requests. Other client may modify or
      move to the new inode in the middle.
      
      When the race happens, ceph_handle_notrace_create() unconditionally
      links the dentry for 'create' operation to the inode returned by lookup.
      This may confuse VFS when the inode is a directory (VFS does not allow
      multiple linkages for directory inode).
      
      This patch makes ceph_handle_notrace_create() when it detect a race.
      This event should be rare and it happens only when we talk to old MDS.
      Recent MDS does not send traceless reply for request that creates new
      inode.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      4d41cef2
    • Y
      ceph: fix dentry leaks · 5cba372c
      Yan, Zheng 提交于
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      5cba372c
    • Y
      ceph: provide seperate {inode,file}_operations for snapdir · 38c48b5f
      Yan, Zheng 提交于
      remove all unsupported operations from {inode,file}_operations.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      38c48b5f
  2. 18 12月, 2014 2 次提交
    • Y
      ceph: fix mksnap crash · 275dd19e
      Yan, Zheng 提交于
      mksnap reply only contain 'target', does not contain 'dentry'. So
      it's wrong to use req->r_reply_info.head->is_dentry to detect traceless
      reply.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      Reviewed-by: NSage Weil <sage@redhat.com>
      275dd19e
    • Y
      ceph: introduce a new inode flag indicating if cached dentries are ordered · 70db4f36
      Yan, Zheng 提交于
      After creating/deleting/renaming file, offsets of sibling dentries may
      change. So we can not use cached dentries to satisfy readdir. But we can
      still use the cached dentries to conclude -ENOENT for lookup.
      
      This patch introduces a new inode flag indicating if child dentries are
      ordered. The flag is set at the same time marking a directory complete.
      After creating/deleting/renaming file, we clear the flag on directory
      inode. This prevents ceph_readdir() from using cached dentries to satisfy
      readdir syscall.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      70db4f36
  3. 20 11月, 2014 2 次提交
  4. 04 11月, 2014 1 次提交
  5. 15 10月, 2014 1 次提交
  6. 09 10月, 2014 1 次提交
  7. 29 4月, 2014 3 次提交
  8. 07 4月, 2014 1 次提交
  9. 05 4月, 2014 1 次提交
  10. 03 4月, 2014 5 次提交
  11. 18 2月, 2014 2 次提交
  12. 30 1月, 2014 1 次提交
  13. 21 1月, 2014 1 次提交
  14. 01 1月, 2014 1 次提交
  15. 01 10月, 2013 1 次提交
  16. 10 8月, 2013 1 次提交
  17. 29 6月, 2013 1 次提交
  18. 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
  19. 23 2月, 2013 1 次提交
  20. 18 12月, 2012 1 次提交
  21. 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
  22. 31 7月, 2012 1 次提交
  23. 14 7月, 2012 6 次提交