1. 26 9月, 2008 3 次提交
    • L
      [XFS] Remove xfs_iext_irec_compact_full() · 71a8c87f
      Lachlan McIlroy 提交于
      Yet another bug was found in xfs_iext_irec_compact_full() and while the
      source of the bug was found it wasn't an easy task to track it down
      because the conditions are very difficult to reproduce.
      
      A HUGE thank-you goes to Russell Cattelan and Eric Sandeen for their
      significant effort in tracking down the source of this corruption.
      
      xfs_iext_irec_compact_full() and xfs_iext_irec_compact_pages() are almost
      identical - they both compact indirect extent lists by moving extents from
      subsequent buffers into earlier ones. xfs_iext_irec_compact_pages() only
      moves extents if all of the extents in the next buffer will fit into the
      empty space in the buffer before it. xfs_iext_irec_compact_full() will go
      a step further and move part of the next buffer if all the extents wont
      fit. It will then shift the remaining extents in the next buffer up to the
      start of the buffer. The bug here was that we did not update er_extoff and
      this caused extent list corruption.
      
      It does not appear that this extra functionality gains us much. Calling
      xfs_iext_irec_compact_pages() instead will do a good enough job at
      compacting the indirect list and will be quicker too.
      
      For the case in xfs_iext_indirect_to_direct() the total number of extents
      in the indirect list will fit into one buffer so we will never need the
      extra functionality of xfs_iext_irec_compact_full() there.
      
      Also xfs_iext_irec_compact_pages() doesn't need to do a memmove() (the
      buffers will never overlap) so we don't want the performance hit that can
      incur.
      
      SGI-PV: 987159
      
      SGI-Modid: xfs-linux-melb:xfs-kern:32166a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      71a8c87f
    • L
      [XFS] Fix extent list corruption in xfs_iext_irec_compact_full(). · f1ccd295
      Lachlan McIlroy 提交于
      If we don't move all the records from the next buffer into the current
      buffer then we need to update the er_extoff field of the next buffer as we
      shift the remaining records to the start of the buffer.
      
      SGI-PV: 987159
      
      SGI-Modid: xfs-linux-melb:xfs-kern:32165a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: NRussell Cattelan <cattelan@thebarn.com>
      f1ccd295
    • R
      IPoIB: Fix crash when path record fails after path flush · 6ef190cc
      Roland Dreier 提交于
      Commit ee1e2c82 ("IPoIB: Refresh paths instead of flushing them on SM
      change events") changed how paths are flushed on an SM event.  This
      change introduces a problem if the path record query triggered by
      fails, causing path->ah to become NULL.  A later successful path query
      will then trigger WARN_ON() in path_rec_completion(), and crash
      because path->ah has already been freed, so the ipoib_put_ah() inside
      the lock in path_rec_completion() may actually drop the last reference
      (contrary to the comment that claims this is safe).
      
      Fix this by updating path->ah and freeing old_ah only when the path
      record query is successful.  This prevents the neighbour AH and that
      path AH from getting out of sync.
      
      This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1194>
      Reported-by: NRabah Salem <ravah@mellanox.com>
      Debugged-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6ef190cc
  2. 25 9月, 2008 18 次提交
  3. 24 9月, 2008 19 次提交