1. 26 1月, 2014 1 次提交
    • I
      libceph: add ceph_kv{malloc,free}() and switch to them · eeb0bed5
      Ilya Dryomov 提交于
      Encapsulate kmalloc vs vmalloc memory allocation and freeing logic into
      two helpers, ceph_kvmalloc() and ceph_kvfree(), and switch to them.
      
      ceph_kvmalloc() kmalloc()'s a maximum of 8 pages, anything bigger is
      vmalloc()'ed with __GFP_HIGHMEM set.  This changes the existing
      behaviour:
      
      - for buffers (ceph_buffer_new()), from trying to kmalloc() everything
        and using vmalloc() just as a fallback
      
      - for messages (ceph_msg_new()), from going to vmalloc() for anything
        bigger than a page
      
      - for messages (ceph_msg_new()), from disallowing vmalloc() to use high
        memory
      Signed-off-by: NIlya Dryomov <ilya.dryomov@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      eeb0bed5
  2. 01 1月, 2014 1 次提交
  3. 03 5月, 2013 1 次提交
  4. 27 2月, 2013 1 次提交
  5. 14 2月, 2013 2 次提交
    • A
      rbd: don't take extra bio reference for osd client · 1e32d34c
      Alex Elder 提交于
      Currently, if the OSD client finds an osd request has had a bio list
      attached to it, it drops a reference to it (or rather, to the first
      entry on that list) when the request is released.
      
      The code that added that reference (i.e., the rbd client) is
      therefore required to take an extra reference to that first bio
      structure.
      
      The osd client doesn't really do anything with the bio pointer other
      than transfer it from the osd request structure to outgoing (for
      writes) and ingoing (for reads) messages.  So it really isn't the
      right place to be taking or dropping references.
      
      Furthermore, the rbd client already holds references to all bio
      structures it passes to the osd client, and holds them until the
      request is completed.  So there's no need for this extra reference
      whatsoever.
      
      So remove the bio_put() call in ceph_osdc_release_request(), as
      well as its matching bio_get() call in rbd_osd_req_create().
      
      This change could lead to a crash if old libceph.ko was used with
      new rbd.ko.  Add a compatibility check at rbd initialization time to
      avoid this possibilty.
      
      This resolves:
          http://tracker.ceph.com/issues/3798    and
          http://tracker.ceph.com/issues/3799Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      1e32d34c
    • A
      libceph: add a compatibility check interface · 72fe25e3
      Alex Elder 提交于
      An upcoming change implements semantic change that could lead to
      a crash if an old version of the libceph kernel module is used with
      a new version of the rbd kernel module.
      
      In order to preclude that possibility, this adds a compatibilty
      check interface.  If this interface doesn't exist, the modules are
      obviously not compatible.  But if it does exist, this provides a way
      of letting the caller know whether it will operate properly with
      this libceph module.
      
      Perhaps confusingly, it returns false right now.  The semantic
      change mentioned above will make it return true.
      
      This resolves:
          http://tracker.ceph.com/issues/3800Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      72fe25e3
  6. 12 2月, 2013 1 次提交
  7. 13 12月, 2012 1 次提交
    • S
      libceph: remove 'osdtimeout' option · 83aff95e
      Sage Weil 提交于
      This would reset a connection with any OSD that had an outstanding
      request that was taking more than N seconds.  The idea was that if the
      OSD was buggy, the client could compensate by resending the request.
      
      In reality, this only served to hide server bugs, and we haven't
      actually seen such a bug in quite a while.  Moreover, the userspace
      client code never did this.
      
      More importantly, often the request is taking a long time because the
      OSD is trying to recover, or overloaded, and killing the connection
      and retrying would only make the situation worse by giving the OSD
      more work to do.
      Signed-off-by: NSage Weil <sage@inktank.com>
      Reviewed-by: NAlex Elder <elder@inktank.com>
      83aff95e
  8. 21 8月, 2012 1 次提交
  9. 31 7月, 2012 2 次提交
  10. 20 6月, 2012 1 次提交
    • S
      libceph: flush msgr queue during mon_client shutdown · 642c0dbd
      Sage Weil 提交于
      We need to flush the msgr workqueue during mon_client shutdown to
      ensure that any work affecting our embedded ceph_connection is
      finished so that we can be safely destroyed.
      
      Previously, we were flushing the work queue after osd_client
      shutdown and before mon_client shutdown to ensure that any osd
      connection refs to authorizers are flushed.  Remove the redundant
      flush, and document in the comment that the mon_client flush is
      needed to cover that case as well.
      Signed-off-by: NSage Weil <sage@inktank.com>
      Reviewed-by: NAlex Elder <elder@inktank.com>
      (cherry picked from commit f3dea7ed)
      642c0dbd
  11. 16 6月, 2012 1 次提交
    • S
      libceph: flush msgr queue during mon_client shutdown · f3dea7ed
      Sage Weil 提交于
      We need to flush the msgr workqueue during mon_client shutdown to
      ensure that any work affecting our embedded ceph_connection is
      finished so that we can be safely destroyed.
      
      Previously, we were flushing the work queue after osd_client
      shutdown and before mon_client shutdown to ensure that any osd
      connection refs to authorizers are flushed.  Remove the redundant
      flush, and document in the comment that the mon_client flush is
      needed to cover that case as well.
      Signed-off-by: NSage Weil <sage@inktank.com>
      Reviewed-by: NAlex Elder <elder@inktank.com>
      f3dea7ed
  12. 01 6月, 2012 1 次提交
  13. 16 4月, 2012 1 次提交
  14. 22 3月, 2012 2 次提交
  15. 03 2月, 2012 1 次提交
    • S
      ceph: initialize client debugfs outside of monc->mutex · ab434b60
      Sage Weil 提交于
      Initializing debufs under monc->mutex introduces a lock dependency for
      sb->s_type->i_mutex_key, which (combined with several other dependencies)
      leads to an annoying lockdep warning.  There's no particular reason to do
      the debugfs setup under this lock, so move it out.
      
      It used to be the case that our first monmap could come from the OSD; that
      is no longer the case with recent servers, so we will reliably set up the
      client entry during the initial authentication.
      
      We don't have to worry about racing with debugfs teardown by
      ceph_debugfs_client_cleanup() because ceph_destroy_client() calls
      ceph_msgr_flush() first, which will wait for the message dispatch work
      to complete (and the debugfs init to complete).
      
      Fixes: #1940
      Signed-off-by: NSage Weil <sage@newdream.net>
      ab434b60
  16. 26 10月, 2011 1 次提交
  17. 17 9月, 2011 1 次提交
  18. 30 3月, 2011 3 次提交
  19. 26 3月, 2011 1 次提交
    • S
      ceph: flush msgr_wq during mds_client shutdown · ef550f6f
      Sage Weil 提交于
      The release method for mds connections uses a backpointer to the
      mds_client, so we need to flush the workqueue of any pending work (and
      ceph_connection references) prior to freeing the mds_client.  This fixes
      an oops easily triggered under UML by
      
       while true ; do mount ... ; umount ... ; done
      
      Also fix an outdated comment: the flush in ceph_destroy_client only flushes
      OSD connections out.  This bug is basically an artifact of the ceph ->
      ceph+libceph conversion.
      Signed-off-by: NSage Weil <sage@newdream.net>
      ef550f6f
  20. 23 3月, 2011 1 次提交
  21. 21 10月, 2010 2 次提交
    • Y
      ceph: don't crash when passed bad mount options · 010e3b48
      Yehuda Sadeh 提交于
      This only happened when parse_extra_token was not passed
      to ceph_parse_option() (hence, only happened in rbd).
      Signed-off-by: NYehuda Sadeh <yehuda@hq.newdream.net>
      010e3b48
    • 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