1. 05 3月, 2010 1 次提交
    • Y
      ceph: reset osd after relevant messages timed out · 422d2cb8
      Yehuda Sadeh 提交于
      This simplifies the process of timing out messages. We
      keep lru of current messages that are in flight. If a
      timeout has passed, we reset the osd connection, so that
      messages will be retransmitted.  This is a failsafe in case
      we hit some sort of problem sending out message to the OSD.
      Normally, we'll get notification via an updated osdmap if
      there are problems.
      
      If a request is older than the keepalive timeout, send a
      keepalive to ensure we detect any breaks in the TCP connection.
      Signed-off-by: NYehuda Sadeh <yehuda@hq.newdream.net>
      Signed-off-by: NSage Weil <sage@newdream.net>
      422d2cb8
  2. 02 3月, 2010 1 次提交
    • S
      ceph: fix flush_dirty_caps race with caps migration · e9964c10
      Sage Weil 提交于
      The flush_dirty_caps() used to loop over the first entry of the cap_dirty
      dirty list on the assumption that after calling ceph_check_caps() it would
      be removed from the list.  This isn't true for caps that are being
      migrated between MDSs, where we've received the EXPORT but not the IMPORT.
      
      Instead, do a safe list iteration, and pin the next inode on the list via
      the CEPH_I_NOFLUSH flag.
      Signed-off-by: NSage Weil <sage@newdream.net>
      e9964c10
  3. 24 2月, 2010 1 次提交
  4. 18 2月, 2010 2 次提交
    • S
      ceph: fix iterate_caps removal race · 7c1332b8
      Sage Weil 提交于
      We need to be able to iterate over all caps on a session with a
      possibly slow callback on each cap.  To allow this, we used to
      prevent cap reordering while we were iterating.  However, we were
      not safe from races with removal: removing the 'next' cap would
      make the next pointer from list_for_each_entry_safe be invalid,
      and cause a lock up or similar badness.
      
      Instead, we keep an iterator pointer in the session pointing to
      the current cap.  As before, we avoid reordering.  For removal,
      if the cap isn't the current cap we are iterating over, we are
      fine.  If it is, we clear cap->ci (to mark the cap as pending
      removal) but leave it in the session list.  In iterate_caps, we
      can safely finish removal and get the next cap pointer.
      
      While we're at it, clean up put_cap to not take a cap reservation
      context, as it was never used.
      Signed-off-by: NSage Weil <sage@newdream.net>
      7c1332b8
    • S
      ceph: clean up readdir caps reservation · 85ccce43
      Sage Weil 提交于
      Use a global counter for the minimum number of allocated caps instead of
      hard coding a check against readdir_max.  This takes into account multiple
      client instances, and avoids examining the superblock mount options when a
      cap is dropped.
      Signed-off-by: NSage Weil <sage@newdream.net>
      85ccce43
  5. 17 2月, 2010 1 次提交
  6. 12 2月, 2010 2 次提交
  7. 11 2月, 2010 1 次提交
  8. 22 12月, 2009 2 次提交
  9. 21 11月, 2009 1 次提交
    • S
      ceph: fix debugfs entry, simplify fsid checks · 0743304d
      Sage Weil 提交于
      We may first learn our fsid from any of the mon, osd, or mds maps
      (whichever the monitor sends first).  Consolidate checks in a single
      helper.  Initialize the client debugfs entry then, since we need the
      fsid (and global_id) for the directory name.
      
      Also remove dead mount code.
      Signed-off-by: NSage Weil <sage@newdream.net>
      0743304d
  10. 19 11月, 2009 1 次提交
    • S
      ceph: negotiate authentication protocol; implement AUTH_NONE protocol · 4e7a5dcd
      Sage Weil 提交于
      When we open a monitor session, we send an initial AUTH message listing
      the auth protocols we support, our entity name, and (possibly) a previously
      assigned global_id.  The monitor chooses a protocol and responds with an
      initial message.
      
      Initially implement AUTH_NONE, a dummy protocol that provides no security,
      but works within the new framework.  It generates 'authorizers' that are
      used when connecting to (mds, osd) services that simply state our entity
      name and global_id.
      
      This is a wire protocol change.
      Signed-off-by: NSage Weil <sage@newdream.net>
      4e7a5dcd
  11. 13 11月, 2009 1 次提交
  12. 11 11月, 2009 1 次提交
  13. 10 11月, 2009 1 次提交
    • S
      ceph: do not confuse stale and dead (unreconnected) caps · 685f9a5d
      Sage Weil 提交于
      We were using the cap_gen to track both stale caps (caps that timed out
      due to temporarily losing touch with the mds) and dead caps that did not
      reconnect after an MDS failure.  Introduce a recon_gen counter to track
      reconnections to restarted MDSs and kill dead caps based on that instead.
      
      Rename gen to cap_gen while we're at it to make it more clear which is
      which.
      Signed-off-by: NSage Weil <sage@newdream.net>
      685f9a5d
  14. 29 10月, 2009 1 次提交
  15. 28 10月, 2009 1 次提交
  16. 23 10月, 2009 1 次提交
  17. 17 10月, 2009 1 次提交
  18. 16 10月, 2009 1 次提交
    • S
      ceph: flush dirty caps via the cap_dirty list · afcdaea3
      Sage Weil 提交于
      Previously we were flushing dirty caps by passing an extra flag
      when traversing the delayed caps list.  Besides being a bit ugly,
      that can also miss caps that are dirty but didn't result in a
      cap requeue: notably, mark_caps_dirty().
      
      Separate the flushing into a separate helper, and traverse the
      cap_dirty list.
      
      This also brings i_dirty_item in line with i_dirty_caps: we are
      on the list IFF caps != 0.  We carry an inode ref IFF
      dirty_caps|flushing_caps != 0.
      
      Lose the unused return value from __ceph_mark_caps_dirty().
      Signed-off-by: NSage Weil <sage@newdream.net>
      afcdaea3
  19. 07 10月, 2009 1 次提交
    • S
      ceph: client types · de57606c
      Sage Weil 提交于
      We first define constants, types, and prototypes for the kernel client
      proper.
      
      A few subsystems are defined separately later: the MDS, OSD, and
      monitor clients, and the messaging layer.
      Signed-off-by: NSage Weil <sage@newdream.net>
      de57606c