1. 25 1月, 2013 1 次提交
    • D
      xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end · 10616b80
      Dave Chinner 提交于
      When _xfs_buf_find is passed an out of range address, it will fail
      to find a relevant struct xfs_perag and oops with a null
      dereference. This can happen when trying to walk a filesystem with a
      metadata inode that has a partially corrupted extent map (i.e. the
      block number returned is corrupt, but is otherwise intact) and we
      try to read from the corrupted block address.
      
      In this case, just fail the lookup. If it is readahead being issued,
      it will simply not be done, but if it is real read that fails we
      will get an error being reported.  Ideally this case should result
      in an EFSCORRUPTED error being reported, but we cannot return an
      error through xfs_buf_read() or xfs_buf_get() so this lookup failure
      may result in ENOMEM or EIO errors being reported instead.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NBen Myers <bpm@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      10616b80
  2. 19 1月, 2013 1 次提交
  3. 18 1月, 2013 2 次提交
  4. 17 1月, 2013 1 次提交
  5. 14 1月, 2013 2 次提交
    • A
      fs/xfs remove obsolete simple_strto<foo> · a17164e5
      Abhijit Pawar 提交于
      This patch replaces usages of obsolete simple_strtoul with kstrtoint in
      xfs_args and suffix_strtoul.
      Signed-off-by: NAbhijit Pawar <abhi.c.pawar@gmail.com>
      Reviewed-by: NJie Liu <jeff.liu@oracle.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      a17164e5
    • E
      xfs: recalculate leaf entry pointer after compacting a dir2 block · d4608632
      Eric Sandeen 提交于
      Dave Jones hit this assert when doing a compile on recent git, with
      CONFIG_XFS_DEBUG enabled:
      
      XFS: Assertion failed: (char *)dup - (char *)hdr == be16_to_cpu(*xfs_dir2_data_unused_tag_p(dup)), file: fs/xfs/xfs_dir2_data.c, line: 828
      
      Upon further digging, the tag found by xfs_dir2_data_unused_tag_p(dup)
      contained "2" and not the proper offset, and I found that this value was
      changed after the memmoves under "Use a stale leaf for our new entry."
      in xfs_dir2_block_addname(), i.e.
      
                              memmove(&blp[mid + 1], &blp[mid],
                                      (highstale - mid) * sizeof(*blp));
      
      overwrote it.
      
      What has happened is that the previous call to xfs_dir2_block_compact()
      has rearranged things; it changes btp->count as well as the
      blp array.  So after we make that call, we must recalculate the
      proper pointer to the leaf entries by making another call to
      xfs_dir2_block_leaf_p().
      
      Dave provided a metadump image which led to a simple reproducer
      (create a particular filename in the affected directory) and this
      resolves the testcase as well as the bug on his live system.
      
      Thanks also to dchinner for looking at this one with me.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Tested-by: NDave Jones <davej@redhat.com>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NMark Tinguely <tinguely@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      d4608632
  6. 04 1月, 2013 2 次提交
  7. 01 1月, 2013 1 次提交
  8. 22 12月, 2012 30 次提交