1. 03 4月, 2014 1 次提交
  2. 18 2月, 2014 3 次提交
  3. 29 1月, 2014 1 次提交
    • L
      ceph: Fix up after semantic merge conflict · 4db658ea
      Linus Torvalds 提交于
      The previous ceph-client merge resulted in ceph not even building,
      because there was a merge conflict that wasn't visible as an actual data
      conflict: commit 7221fe4c ("ceph: add acl for cephfs") added support
      for POSIX ACL's into Ceph, but unluckily we also had the VFS tree change
      a lot of the POSIX ACL helper functions to be much more helpful to
      filesystems (see for example commits 2aeccbe9 "fs: add generic
      xattr_acl handlers", 5bf3258f "fs: make posix_acl_chmod more useful"
      and 37bc1539 "fs: make posix_acl_create more useful")
      
      The reason this conflict wasn't obvious was many-fold: because it was a
      semantic conflict rather than a data conflict, it wasn't visible in the
      git merge as a conflict.  And because the VFS tree hadn't been in
      linux-next, people hadn't become aware of it that way.  And because I
      was at jury duty this morning, I was using my laptop and as a result not
      doing constant "allmodconfig" builds.
      
      Anyway, this fixes the build and generally removes a fair chunk of the
      Ceph POSIX ACL support code, since the improved helpers seem to match
      really well for Ceph too.  But I don't actually have any way to *test*
      the end result, and I was really hoping for some ACK's for this.  Oh,
      well.
      
      Not compiling certainly doesn't make things easier to test, so I'm
      committing this without the acks after having waited for four hours...
      Plus it's what I would have done for the merge had I noticed the
      semantic conflict..
      Reported-by: NDave Jones <davej@redhat.com>
      Cc: Sage Weil <sage@inktank.com>
      Cc: Guangliang Zhao <lucienchao@gmail.com>
      Cc: Li Wang <li.wang@ubuntykylin.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4db658ea
  4. 01 1月, 2014 1 次提交
  5. 04 7月, 2013 1 次提交
    • M
      ceph: fix sleeping function called from invalid context. · a1dc1937
      majianpeng 提交于
      [ 1121.231883] BUG: sleeping function called from invalid context at kernel/rwsem.c:20
      [ 1121.231935] in_atomic(): 1, irqs_disabled(): 0, pid: 9831, name: mv
      [ 1121.231971] 1 lock held by mv/9831:
      [ 1121.231973]  #0:  (&(&ci->i_ceph_lock)->rlock){+.+...},at:[<ffffffffa02bbd38>] ceph_getxattr+0x58/0x1d0 [ceph]
      [ 1121.231998] CPU: 3 PID: 9831 Comm: mv Not tainted 3.10.0-rc6+ #215
      [ 1121.232000] Hardware name: To Be Filled By O.E.M. To Be Filled By
      O.E.M./To be filled by O.E.M., BIOS 080015  11/09/2011
      [ 1121.232027]  ffff88006d355a80 ffff880092f69ce0 ffffffff8168348c ffff880092f69cf8
      [ 1121.232045]  ffffffff81070435 ffff88006d355a20 ffff880092f69d20 ffffffff816899ba
      [ 1121.232052]  0000000300000004 ffff8800b76911d0 ffff88006d355a20 ffff880092f69d68
      [ 1121.232056] Call Trace:
      [ 1121.232062]  [<ffffffff8168348c>] dump_stack+0x19/0x1b
      [ 1121.232067]  [<ffffffff81070435>] __might_sleep+0xe5/0x110
      [ 1121.232071]  [<ffffffff816899ba>] down_read+0x2a/0x98
      [ 1121.232080]  [<ffffffffa02baf70>] ceph_vxattrcb_layout+0x60/0xf0 [ceph]
      [ 1121.232088]  [<ffffffffa02bbd7f>] ceph_getxattr+0x9f/0x1d0 [ceph]
      [ 1121.232093]  [<ffffffff81188d28>] vfs_getxattr+0xa8/0xd0
      [ 1121.232097]  [<ffffffff8118900b>] getxattr+0xab/0x1c0
      [ 1121.232100]  [<ffffffff811704f2>] ? final_putname+0x22/0x50
      [ 1121.232104]  [<ffffffff81155f80>] ? kmem_cache_free+0xb0/0x260
      [ 1121.232107]  [<ffffffff811704f2>] ? final_putname+0x22/0x50
      [ 1121.232110]  [<ffffffff8109e63d>] ? trace_hardirqs_on+0xd/0x10
      [ 1121.232114]  [<ffffffff816957a7>] ? sysret_check+0x1b/0x56
      [ 1121.232120]  [<ffffffff81189c9c>] SyS_fgetxattr+0x6c/0xc0
      [ 1121.232125]  [<ffffffff81695782>] system_call_fastpath+0x16/0x1b
      [ 1121.232129] BUG: scheduling while atomic: mv/9831/0x10000002
      [ 1121.232154] 1 lock held by mv/9831:
      [ 1121.232156]  #0:  (&(&ci->i_ceph_lock)->rlock){+.+...}, at:
      [<ffffffffa02bbd38>] ceph_getxattr+0x58/0x1d0 [ceph]
      
      I think move the ci->i_ceph_lock down is safe because we can't free
      ceph_inode_info at there.
      
      CC: stable@vger.kernel.org  # 3.8+
      Signed-off-by: NJianpeng Ma <majianpeng@gmail.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      a1dc1937
  6. 26 2月, 2013 1 次提交
  7. 14 2月, 2013 10 次提交
  8. 31 7月, 2012 1 次提交
  9. 08 5月, 2012 1 次提交
  10. 22 3月, 2012 9 次提交
  11. 03 2月, 2012 1 次提交
  12. 13 1月, 2012 1 次提交
    • A
      ceph: ensure prealloc_blob is in place when removing xattr · 83eb26af
      Alex Elder 提交于
      In __ceph_build_xattrs_blob(), if a ceph inode's extended attributes
      are marked dirty, all attributes recorded in its rb_tree index are
      formatted into a "blob" buffer.  The target buffer is recorded in
      ceph_inode->i_xattrs.prealloc_blob, and it is expected to exist and
      be of sufficient size to hold the attributes.
      
      The extended attributes are marked dirty in two cases: when a new
      attribute is added to the inode; or when one is removed.  In the
      former case work is done to ensure the prealloc_blob buffer is
      properly set up, but in the latter it is not.
      
      Change the logic in ceph_removexattr() so it matches what is
      done in ceph_setxattr().  Note that this is done in a way that
      keeps the two blocks of code nearly identical, in anticipation
      of a subsequent patch that encapsulates some of this logic into
      one or more helper routines.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Signed-off-by: NSage Weil <sage@newdream.net>
      83eb26af
  13. 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
  14. 27 7月, 2011 1 次提交
  15. 08 6月, 2011 1 次提交
  16. 05 5月, 2011 1 次提交
  17. 14 1月, 2011 1 次提交
    • S
      ceph: fix xattr rbtree search · 17db143f
      Sage Weil 提交于
      Fix xattr name comparison in rbtree search for strings that share a prefix.
      The *name argument is null terminated, but the xattr name is not, so we
      need to use strncmp, but that means adjusting for the case where name is
      a prefix of xattr->name.
      
      The corresponding case in __set_xattr() already handles this properly
      (although in that case *name is also not null terminated).
      Reported-by: NSergiy Kibrik <sakib@meta.ua>
      Signed-off-by: NSage Weil <sage@newdream.net>
      17db143f
  18. 21 10月, 2010 2 次提交
    • J
      fs/ceph/xattr.c: Use kmemdup · 61413c2f
      Julia Lawall 提交于
      Convert a sequence of kmalloc and memcpy to use kmemdup.
      
      The semantic patch that performs this transformation is:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression a,flag,len;
      expression arg,e1,e2;
      statement S;
      @@
      
        a =
      -  \(kmalloc\|kzalloc\)(len,flag)
      +  kmemdup(arg,len,flag)
        <... when != a
        if (a == NULL || ...) S
        ...>
      - memcpy(a,arg,len+1);
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NSage Weil <sage@newdream.net>
      61413c2f
    • 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
  19. 23 8月, 2010 1 次提交
    • S
      ceph: include dirty xattrs state in snapped caps · 4a625be4
      Sage Weil 提交于
      When we snapshot dirty metadata that needs to be written back to the MDS,
      include dirty xattr metadata.  Make the capsnap reference the encoded
      xattr blob so that it will be written back in the FLUSHSNAP op.
      
      Also fix the capsnap creation guard to include dirty auth or file bits,
      not just tests specific to dirty file data or file writes in progress
      (this fixes auth metadata writeback).
      Signed-off-by: NSage Weil <sage@newdream.net>
      4a625be4
  20. 02 8月, 2010 1 次提交