1. 29 Oct, 2010 2 commits
    • Josef Bacik's avatar
      Btrfs: load free space cache if it exists · 9d66e233
      Josef Bacik authored
      This patch actually loads the free space cache if it exists.  The only thing
      that really changes here is that we need to cache the block group if we're going
      to remove an extent from it.  Previously we did not do this since the caching
      kthread would pick it up.  With the on disk cache we don't have this luxury so
      we need to make sure we read the on disk cache in first, and then remove the
      extent, that way when the extent is unpinned the free space is added to the
      block group.  This has been tested with all sorts of things.
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      9d66e233
    • Josef Bacik's avatar
      Btrfs: write out free space cache · 0cb59c99
      Josef Bacik authored
      This is a simple bit, just dump the free space cache out to our preallocated
      inode when we're writing out dirty block groups.  There are a bunch of changes
      in inode.c in order to account for special cases.  Mostly when we're doing the
      writeout we're holding trans_mutex, so we need to use the nolock transacation
      functions.  Also we can't do asynchronous completions since the async thread
      could be blocked on already completed IO waiting for the transaction lock.  This
      has been tested with xfstests and btrfs filesystem balance, as well as my ENOSPC
      tests.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      0cb59c99
  2. 28 Oct, 2010 1 commit
    • Josef Bacik's avatar
      Btrfs: create special free space cache inode · 0af3d00b
      Josef Bacik authored
      In order to save free space cache, we need an inode to hold the data, and we
      need a special item to point at the right inode for the right block group.  So
      first, create a special item that will point to the right inode, and the number
      of extent entries we will have and the number of bitmaps we will have.  We
      truncate and pre-allocate space everytime to make sure it's uptodate.
      
      This feature will be turned on as soon as you mount with -o space_cache, however
      it is safe to boot into old kernels, they will just generate the cache the old
      fashion way.  When you boot back into a newer kernel we will notice that we
      modified and not the cache and automatically discard the cache.
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      0af3d00b
  3. 20 Oct, 2010 5 commits
  4. 19 Oct, 2010 7 commits
  5. 18 Oct, 2010 18 commits
  6. 17 Oct, 2010 4 commits
  7. 16 Oct, 2010 3 commits