1. 26 Sep, 2008 3 commits
    • Zheng Yan's avatar
      Btrfs: extent_map and data=ordered fixes for space balancing · 5b21f2ed
      Zheng Yan authored
      * Add an EXTENT_BOUNDARY state bit to keep the writepage code
      from merging data extents that are in the process of being
      relocated.  This allows us to do accounting for them properly.
      
      * The balancing code relocates data extents indepdent of the underlying
      inode.  The extent_map code was modified to properly account for
      things moving around (invalidating extent_map caches in the inode).
      
      * Don't take the drop_mutex in the create_subvol ioctl.  It isn't
      required.
      
      * Fix walking of the ordered extent list to avoid races with sys_unlink
      
      * Change the lock ordering rules.  Transaction start goes outside
      the drop_mutex.  This allows btrfs_commit_transaction to directly
      drop the relocation trees.
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      5b21f2ed
    • Zheng Yan's avatar
      Btrfs: Add shared reference cache · e4657689
      Zheng Yan authored
      Btrfs has a cache of reference counts in leaves, allowing it to
      avoid reading tree leaves while deleting snapshots.  To reduce
      contention with multiple subvolumes, this cache is private to each
      subvolume.
      
      This patch adds shared reference cache support. The new space
      balancing code plays with multiple subvols at the same time, So
      the old per-subvol reference cache is not well suited.
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      e4657689
    • Zheng Yan's avatar
      Btrfs: allocator fixes for space balancing update · e8569813
      Zheng Yan authored
      * Reserved extent accounting:  reserved extents have been
      allocated in the rbtrees that track free space but have not
      been allocated on disk.  They were never properly accounted for
      in the past, making it hard to know how much space was really free.
      
      * btrfs_find_block_group used to return NULL for block groups that
      had been removed by the space balancing code.  This made it hard
      to account for space during the final stages of a balance run.
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      e8569813
  2. 25 Sep, 2008 37 commits