1. 04 6月, 2018 7 次提交
  2. 17 4月, 2018 1 次提交
    • A
      gfs2: Remove sdp->sd_jheightsize · 9a38662b
      Andreas Gruenbacher 提交于
      GFS2 keeps two arrarys in the superblock that define the maximum size of
      an inode depending on the inode's height: sdp->sd_heightsize defines the
      heights in units of sb->s_blocksize; sdp->sd_jheightsize defines them in
      units of sb->s_blocksize - sizeof(struct gfs2_meta_header).  These
      arrays are used to determine when additional layers of indirect blocks
      are needed.  The second array is used for directories which have an
      additional gfs2_meta_header at the beginning of each block.
      
      Distinguishing between these two cases makes no sense: the height
      required for representing N blocks will come out the same no matter if
      the calculation is done in gross (sb->s_blocksize) or net
      (sb->s_blocksize - sizeof(struct gfs2_meta_header)) units.
      
      Stuffed directories don't have an additional gfs2_meta_header, but the
      stuffed case is handled separately for both files and directories,
      anyway.
      
      Remove the unncessary sdp->sd_jheightsize array.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      9a38662b
  3. 13 4月, 2018 2 次提交
  4. 30 3月, 2018 1 次提交
  5. 29 3月, 2018 1 次提交
  6. 28 3月, 2018 2 次提交
  7. 24 3月, 2018 1 次提交
    • A
      gfs2: Check for the end of metadata in punch_hole · bb491ce6
      Andreas Gruenbacher 提交于
      When punching a hole or truncating an inode down to a given size, also
      check if the truncate point / start of the hole is within the range we
      have metadata for.  Otherwise, we can end up freeing blocks that
      shouldn't be freed, corrupting the inode, or crashing the machine when
      trying to punch a hole into the void.
      
      When growing an inode via truncate, we set the new size but we don't
      allocate additional levels of indirect blocks and grow the inode height.
      When shrinking that inode again, the new size may still point beyond the
      end of the inode's metadata.
      
      Fixes xfstest generic/476.
      Debugged-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      bb491ce6
  8. 15 3月, 2018 1 次提交
  9. 09 3月, 2018 5 次提交
  10. 08 3月, 2018 1 次提交
  11. 14 2月, 2018 1 次提交
    • A
      gfs2: Fixes to "Implement iomap for block_map" · 49edd5bf
      Andreas Gruenbacher 提交于
      It turns out that commit 3974320c "Implement iomap for block_map"
      introduced a few bugs that trigger occasional failures with xfstest
      generic/476:
      
      In gfs2_iomap_begin, we jump to do_alloc when we determine that we are
      beyond the end of the allocated metadata (height > ip->i_height).
      There, we can end up calling hole_size with a metapath that doesn't
      match the current metadata tree, which doesn't make sense.  After
      untangling the code at do_alloc, fix this by checking if the block we
      are looking for is within the range of allocated metadata.
      
      In addition, add a BUG() in case gfs2_iomap_begin is accidentally called
      for reading stuffed files: this is handled separately.  Make sure we
      don't truncate iomap->length for reads beyond the end of the file; in
      that case, the entire range counts as a hole.
      
      Finally, revert to taking a bitmap write lock when doing allocations.
      It's unclear why that change didn't lead to any failures during testing.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      49edd5bf
  12. 02 2月, 2018 2 次提交
  13. 31 1月, 2018 2 次提交
  14. 30 1月, 2018 1 次提交
    • B
      GFS2: Don't try to end a non-existent transaction in unlink · 2eb5909d
      Bob Peterson 提交于
      Before this patch, if function gfs2_unlink failed to get a valid
      transaction (for example, not enough journal blocks) it would go
      to label out_end_trans which did gfs2_trans_end. But if the
      trans_begin failed, there's no transaction to end, and trying to
      do so results in: kernel BUG at fs/gfs2/trans.c:117!
      
      This patch changes the goto so that it does not try to end a
      non-existent transaction.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      2eb5909d
  15. 26 1月, 2018 1 次提交
  16. 23 1月, 2018 2 次提交
  17. 22 1月, 2018 1 次提交
  18. 19 1月, 2018 6 次提交
  19. 17 1月, 2018 2 次提交