1. 15 10月, 2014 2 次提交
  2. 08 7月, 2014 9 次提交
  3. 12 6月, 2014 1 次提交
  4. 05 4月, 2014 2 次提交
  5. 03 4月, 2014 2 次提交
  6. 14 2月, 2014 1 次提交
  7. 08 2月, 2014 2 次提交
  8. 04 2月, 2014 1 次提交
  9. 28 1月, 2014 7 次提交
  10. 26 1月, 2014 1 次提交
  11. 14 1月, 2014 2 次提交
  12. 14 12月, 2013 3 次提交
    • J
      libceph: resend all writes after the osdmap loses the full flag · 9a1ea2db
      Josh Durgin 提交于
      With the current full handling, there is a race between osds and
      clients getting the first map marked full. If the osd wins, it will
      return -ENOSPC to any writes, but the client may already have writes
      in flight. This results in the client getting the error and
      propagating it up the stack. For rbd, the block layer turns this into
      EIO, which can cause corruption in filesystems above it.
      
      To avoid this race, osds are being changed to drop writes that came
      from clients with an osdmap older than the last osdmap marked full.
      In order for this to work, clients must resend all writes after they
      encounter a full -> not full transition in the osdmap. osds will wait
      for an updated map instead of processing a request from a client with
      a newer map, so resent writes will not be dropped by the osd unless
      there is another not full -> full transition.
      
      This approach requires both osds and clients to be fixed to avoid the
      race. Old clients talking to osds with this fix may hang instead of
      returning EIO and potentially corrupting an fs. New clients talking to
      old osds have the same behavior as before if they encounter this race.
      
      Fixes: http://tracker.ceph.com/issues/6938Reviewed-by: NSage Weil <sage@inktank.com>
      Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
      9a1ea2db
    • J
      libceph: block I/O when PAUSE or FULL osd map flags are set · d29adb34
      Josh Durgin 提交于
      The PAUSEWR and PAUSERD flags are meant to stop the cluster from
      processing writes and reads, respectively. The FULL flag is set when
      the cluster determines that it is out of space, and will no longer
      process writes.  PAUSEWR and PAUSERD are purely client-side settings
      already implemented in userspace clients. The osd does nothing special
      with these flags.
      
      When the FULL flag is set, however, the osd responds to all writes
      with -ENOSPC. For cephfs, this makes sense, but for rbd the block
      layer translates this into EIO.  If a cluster goes from full to
      non-full quickly, a filesystem on top of rbd will not behave well,
      since some writes succeed while others get EIO.
      
      Fix this by blocking any writes when the FULL flag is set in the osd
      client. This is the same strategy used by userspace, so apply it by
      default.  A follow-on patch makes this configurable.
      
      __map_request() is called to re-target osd requests in case the
      available osds changed.  Add a paused field to a ceph_osd_request, and
      set it whenever an appropriate osd map flag is set.  Avoid queueing
      paused requests in __map_request(), but force them to be resent if
      they become unpaused.
      
      Also subscribe to the next osd map from the monitor if any of these
      flags are set, so paused requests can be unblocked as soon as
      possible.
      
      Fixes: http://tracker.ceph.com/issues/6079Reviewed-by: NSage Weil <sage@inktank.com>
      Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
      d29adb34
    • L
      ceph: Add necessary clean up if invalid reply received in handle_reply() · 37c89bde
      Li Wang 提交于
      Wake up possible waiters, invoke the call back if any, unregister the request
      Signed-off-by: NLi Wang <liwang@ubuntukylin.com>
      Signed-off-by: NYunchuan Wen <yunchuanwen@ubuntukylin.com>
      Signed-off-by: NSage Weil <sage@inktank.com>
      37c89bde
  13. 10 9月, 2013 1 次提交
  14. 28 8月, 2013 3 次提交
  15. 16 8月, 2013 1 次提交
  16. 10 8月, 2013 1 次提交
  17. 04 7月, 2013 1 次提交
    • Y
      libceph: call r_unsafe_callback when unsafe reply is received · 61c5d6bf
      Yan, Zheng 提交于
      We can't use !req->r_sent to check if OSD request is sent for the
      first time, this is because __cancel_request() zeros req->r_sent
      when OSD map changes. Rather than adding a new variable to struct
      ceph_osd_request to indicate if it's sent for the first time, We
      can call the unsafe callback only when unsafe OSD reply is received.
      If OSD's first reply is safe, just skip calling the unsafe callback.
      
      The purpose of unsafe callback is adding unsafe request to a list,
      so that fsync(2) can wait for the safe reply. fsync(2) doesn't need
      to wait for a write(2) that hasn't returned yet. So it's OK to add
      request to the unsafe list when the first OSD reply is received.
      (ceph_sync_write() returns after receiving the first OSD reply)
      Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      61c5d6bf