1. 17 Mar, 2011 4 commits
    • Josef Bacik's avatar
      Btrfs: change reserved_extents to an atomic_t · 57a45ced
      Josef Bacik authored
      We track delayed allocation per inodes via 2 counters, one is
      outstanding_extents and reserved_extents.  Outstanding_extents is already an
      atomic_t, but reserved_extents is not and is protected by a spinlock.  So
      convert this to an atomic_t and instead of using a spinlock, use atomic_cmpxchg
      when releasing delalloc bytes.  This makes our inode 72 bytes smaller, and
      reduces locking overhead (albiet it was minimal to begin with).  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      57a45ced
    • Josef Bacik's avatar
      Btrfs: fix how we deal with the pages array in the write path · 4a64001f
      Josef Bacik authored
      Really we don't need to memset the pages array at all, since we know how many
      pages we're going to use in the array and pass that around.  So don't memset,
      just trust we're not idiots and we pass num_pages around properly.
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      4a64001f
    • Josef Bacik's avatar
      Btrfs: simplify our write path · d0215f3e
      Josef Bacik authored
      Our aio_write function is huge and kind of hard to follow at times.  So this
      patch fixes this by breaking out the buffered and direct write paths out into
      seperate functions so it's a little clearer what's going on.  I've also fixed
      some wrong typing that we had and added the ability to handle getting an error
      back from btrfs_set_extent_delalloc.  Tested this with xfstests and everything
      came out fine.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      d0215f3e
    • Josef Bacik's avatar
      Btrfs: fix formatting in file.c · 9f570b8d
      Josef Bacik authored
      Sorry, but these were bugging me.  Just cleanup some of the formatting in
      file.c.
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      9f570b8d
  2. 15 Mar, 2011 1 commit
  3. 14 Mar, 2011 35 commits