1. 19 Oct, 2011 12 commits
    • Josef Bacik's avatar
      Btrfs: kill unused parts of block_rsv · dabdb640
      Josef Bacik authored
      The priority and refill_used flags are not used anymore, and neither is the
      usage counter, so just remove them from btrfs_block_rsv.
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      dabdb640
    • Josef Bacik's avatar
      Btrfs: ratelimit the generation printk for the free space cache · 6ab60601
      Josef Bacik authored
      A user reported getting spammed when moving to 3.0 by this message.  Since we
      switched to the normal checksumming infrastructure all old free space caches
      will be wrong and need to be regenerated so people are likely to see this
      message a lot, so ratelimit it so it doesn't fill up their logs and freak them
      out.  Thanks,
      Reported-by: default avatarAndrew Lutomirski <luto@mit.edu>
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      6ab60601
    • Josef Bacik's avatar
      Btrfs: fix how we reserve space for deleting inodes · 4289a667
      Josef Bacik authored
      I converted btrfs_truncate to do sane reservations for truncate, but didn't
      convert btrfs_evict_inode.  Basically we need to save the orphan_rsv for
      deleting the orphan item, and do normal reservations for our truncate.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      4289a667
    • Josef Bacik's avatar
      Btrfs: kill the durable block rsv stuff · 37be25bc
      Josef Bacik authored
      This is confusing code and isn't used by anything anymore, so delete it.
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      37be25bc
    • Josef Bacik's avatar
      Btrfs: kill the orphan space calculation for snapshots · dba68306
      Josef Bacik authored
      This patch kills off the calculation for the amount of space needed for the
      orphan operations during a snapshot.  The thing is we only do snapshots on
      commit, so any space that is in the block_rsv->freed[] isn't going to be in the
      new snapshot anyway, so there isn't any reason to require that space to be
      reserved for the snapshot to occur.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      dba68306
    • Josef Bacik's avatar
      Btrfs: calculate checksum space correctly · 7709cde3
      Josef Bacik authored
      We have not been reserving enough space for checksums.  We were just reserving
      bytes for the checksum items themselves, we were not taking into account having
      to cow the tree and such.  This patch adds a csum_bytes counter to the inode for
      keeping track of the number of bytes outstanding we have for checksums.  Then we
      calculate how many leaves would be required for the checksums we are given and
      use that to reserve space.  This adds a significant amount of bytes to our
      reservations, but we will handle this later.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      7709cde3
    • Josef Bacik's avatar
      Btrfs: skip looking for delalloc if we don't have ->fill_delalloc · 9e487107
      Josef Bacik authored
      We always look for delalloc bytes in our io_tree so we can fill in delalloc.
      This is fine in most cases, but if we're writing out the btree_inode this is
      just a superfluous tree search on the io_tree, and if we have a lot of metadata
      dirty this could be an expensive check.  So instead check to see if our io_tree
      has a ->fill_delalloc op, and if not don't even bother doing the lookup.
      Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      9e487107
    • Josef Bacik's avatar
      Btrfs: use bytes_may_use for all ENOSPC reservations · fb25e914
      Josef Bacik authored
      We have been using bytes_reserved for metadata reservations, which is wrong
      since we use that to keep track of outstanding reservations from the allocator.
      This resulted in us doing a lot of silly things to make sure we don't allocate a
      bunch of metadata chunks since we never had a real view of how much space was
      actually in use by metadata.
      
      This passes Arne's enospc test and xfstests as well as my own enospc tests.
      Hopefully this will get us moving in the right direction.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      fb25e914
    • Josef Bacik's avatar
      Btrfs: fix how we mount subvol=<whatever> · 830c4adb
      Josef Bacik authored
      We've only been able to mount with subvol=<whatever> where whatever was a subvol
      within whatever root we had as the default.  This allows us to mount -o
      subvol=path/to/subvol/you/want relative from the normal fs_tree root.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      830c4adb
    • Josef Bacik's avatar
      Btrfs: use d_obtain_alias when mounting subvol/subvolid · ba5b8958
      Josef Bacik authored
      Currently what we do is just wrong.  We either
      
      1) Alloc a new "root" dentry with sb->s_root as it's parent which is just wrong
      as we could walk into this subvol later on via another path and hilarity could
      ensue.  Also we don't check the return value of d_splice_alias which isn't good
      either.
      
      or
      
      2) Do a d_find_alias() which we could have lost our dentry from cache at this
      point and found nothing.
      
      So use d_obtain_alias().  In the case that we already have the inode/dentry in
      cache we will get the correct dentry.  If not we will get a disconnected dentry
      tree so if we walk into it later on everything will be connected up properly.
      Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      ba5b8958
    • Josef Bacik's avatar
      Btrfs: kill reserved_bytes in inode · 0cbbdf7c
      Josef Bacik authored
      reserved_bytes is not used for anything in the inode, remove it.
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      0cbbdf7c
    • Josef Bacik's avatar
      Btrfs: move stuff around in btrfs_inode to get better packing · f1bdcc0a
      Josef Bacik authored
      Moving things around to give us better packing in the btrfs_inode.  This reduces
      the size of our inode by 8 bytes.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      f1bdcc0a
  2. 05 Oct, 2011 1 commit
  3. 04 Oct, 2011 12 commits
  4. 03 Oct, 2011 15 commits