1. 13 4月, 2010 1 次提交
  2. 10 4月, 2010 1 次提交
  3. 03 4月, 2010 1 次提交
  4. 02 4月, 2010 3 次提交
    • S
      ceph: fix leaked inode ref due to snap metadata writeback race · 819ccbfa
      Sage Weil 提交于
      We create a ceph_cap_snap if there is dirty cap metadata (for writeback to
      mds) OR dirty pages (for writeback to osd).  It is thus possible that the
      metadata has been written back to the MDS but the OSD data has not when
      the cap_snap is created.  This results in a cap_snap with dirty(caps) == 0.
      The problem is that cap writeback to the MDS isn't necessary, and a
      FLUSHSNAP cap op gets no ack from the MDS.  This leaves the cap_snap
      attached to the inode along with its inode reference.
      
      Fix the problem by dropping the cap_snap if it becomes 'complete' (all
      pages written out) and dirty(caps) == 0 in ceph_put_wrbuffer_cap_refs().
      
      Also, BUG() in __ceph_flush_snaps() if we encounter a cap_snap with
      dirty(caps) == 0.
      Signed-off-by: NSage Weil <sage@newdream.net>
      819ccbfa
    • S
      ceph: fix snap context reference leaks · 6298a337
      Sage Weil 提交于
      The get_oldest_context() helper takes a reference to the returned snap
      context, but most callers weren't dropping that reference.  Fix them.
      
      Also drop the unused locked __get_oldest_context() variant.
      Signed-off-by: NSage Weil <sage@newdream.net>
      6298a337
    • S
      ceph: allow writeback of snapped pages older than 'oldest' snapc · 80e755fe
      Sage Weil 提交于
      On snap deletion, we don't regenerate ceph_cap_snaps for inodes with dirty
      pages because deletion does not affect metadata writeback.  However, we
      did run into problems when we went to write back the pages because the
      'oldest' snapc is determined by the oldest cap_snap, and that may be the
      newer snapc that reflects the deletion.  This caused confusion and an
      infinite loop in ceph_update_writeable_page().
      
      Change the snapc checks to allow writeback of any snapc that is equal to
      OR older than the 'oldest' snapc.
      
      When there are no cap_snaps, we were also using the realm's latest snapc
      for writeback, which complicates ceph_put_wrbufffer_cap_refs().  Instead,
      use i_head_snapc, the most snapc used for the most recent ('head') data.
      This makes the writeback snapc (ceph_osd_request.r_snapc) _always_ match a
      capsnap or i_head_snapc.
      
      Also, in writepags_finish(), drop the snapc referenced by the _page_
      and do not assume it matches the request snapc (it may not anymore).
      Signed-off-by: NSage Weil <sage@newdream.net>
      80e755fe
  5. 31 3月, 2010 3 次提交
  6. 30 3月, 2010 29 次提交
  7. 29 3月, 2010 2 次提交