aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-04-13 12:02:53 -0400
committerJosef Bacik <josef@redhat.com>2011-05-23 13:00:56 -0400
commit74b2107543da4ed9607ec484f63c42362dc9fca6 (patch)
treec4bdfa4b995ae4281dbdf9d1f489009941a51e5b /fs
parent61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff)
Btrfs: make sure to use the delalloc reserve when filling delalloc
In the prealloc filling code and compressed code we don't set trans->block_rsv to the delalloc block reserve properly, which is going to make us use metadata from the wrong pool, this patch fixes that. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7cd8ab0ef04d..3b9f1643aa57 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -619,6 +619,7 @@ retry:
619 619
620 trans = btrfs_join_transaction(root, 1); 620 trans = btrfs_join_transaction(root, 1);
621 BUG_ON(IS_ERR(trans)); 621 BUG_ON(IS_ERR(trans));
622 trans->block_rsv = &root->fs_info->delalloc_block_rsv;
622 ret = btrfs_reserve_extent(trans, root, 623 ret = btrfs_reserve_extent(trans, root,
623 async_extent->compressed_size, 624 async_extent->compressed_size,
624 async_extent->compressed_size, 625 async_extent->compressed_size,
@@ -1060,6 +1061,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
1060 trans = btrfs_join_transaction(root, 1); 1061 trans = btrfs_join_transaction(root, 1);
1061 } 1062 }
1062 BUG_ON(IS_ERR(trans)); 1063 BUG_ON(IS_ERR(trans));
1064 trans->block_rsv = &root->fs_info->delalloc_block_rsv;
1063 1065
1064 cow_start = (u64)-1; 1066 cow_start = (u64)-1;
1065 cur_offset = start; 1067 cur_offset = start;