1. 06 2月, 2011 3 次提交
    • T
      btrfs: cleanup error handling in btrfs_unlink_inode() · 554233a6
      Tsutomu Itoh 提交于
      When btrfs_alloc_path() fails, btrfs_free_path() need not be called.
      Therefore, it changes the branch ahead.
      Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      554233a6
    • J
      Btrfs: exclude super blocks when we read in block groups · 3c14874a
      Josef Bacik 提交于
      This has been resulting in a BUT_ON(ret) after btrfs_reserve_extent in
      btrfs_cow_file_range.  The reason is we don't actually calculate the bytes_super
      for a block group until we go to cache it, which means that the space_info can
      hand out reservations for space that it doesn't actually have, and we can run
      out of data space.  This is also a problem if you are using space caching since
      we don't ever calculate bytes_super for the block groups.  So instead everytime
      we read a block group call exclude_super_stripes, which calculates the
      bytes_super for the block group so it can be left out of the space_info.  Then
      whenever caching completes we just call free_excluded_extents so that the super
      excluded extents are freed up.  Also if we are unmounting and we hit any block
      groups that haven't been cached we still need to call free_excluded_extents to
      make sure things are cleaned up properly.  Thanks,
      Reported-by: NArne Jansen <sensille@gmx.net>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      3c14874a
    • J
      Btrfs: make sure search_bitmap finds something in remove_from_bitmap · 13dbc089
      Josef Bacik 提交于
      When we're cleaning up the tree log we need to be able to remove free space from
      the block group.  The problem is if that free space spans bitmaps we would not
      find the space since we're looking for too many bytes.  So make sure the amount
      of bytes we search for is limited to either the number of bytes we want, or the
      number of bytes left in the bitmap.  This was tested by a user who was hitting
      the BUG() after search_bitmap.  With this patch he can now mount his fs.
      Thanks,
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      13dbc089
  2. 01 2月, 2011 5 次提交
  3. 29 1月, 2011 12 次提交
  4. 27 1月, 2011 12 次提交
  5. 18 1月, 2011 1 次提交
    • L
      Btrfs: forced readonly mounts on errors · acce952b
      liubo 提交于
      This patch comes from "Forced readonly mounts on errors" ideas.
      
      As we know, this is the first step in being more fault tolerant of disk
      corruptions instead of just using BUG() statements.
      
      The major content:
      - add a framework for generating errors that should result in filesystems
        going readonly.
      - keep FS state in disk super block.
      - make sure that all of resource will be freed and released at umount time.
      - make sure that fter FS is forced readonly on error, there will be no more
        disk change before FS is corrected. For this, we should stop write operation.
      
      After this patch is applied, the conversion from BUG() to such a framework can
      happen incrementally.
      Signed-off-by: NLiu Bo <liubo2009@cn.fujitsu.com>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      acce952b
  6. 17 1月, 2011 7 次提交