From: Josef Bacik Date: Wed, 13 Apr 2011 16:02:53 +0000 (-0400) Subject: Btrfs: make sure to use the delalloc reserve when filling delalloc X-Git-Tag: upstream/snapshot3+hdmi~9699^2~44^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74b2107543da4ed9607ec484f63c42362dc9fca6;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7cd8ab0..3b9f164 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -619,6 +619,7 @@ retry: trans = btrfs_join_transaction(root, 1); BUG_ON(IS_ERR(trans)); + trans->block_rsv = &root->fs_info->delalloc_block_rsv; ret = btrfs_reserve_extent(trans, root, async_extent->compressed_size, async_extent->compressed_size, @@ -1060,6 +1061,7 @@ static noinline int run_delalloc_nocow(struct inode *inode, trans = btrfs_join_transaction(root, 1); } BUG_ON(IS_ERR(trans)); + trans->block_rsv = &root->fs_info->delalloc_block_rsv; cow_start = (u64)-1; cur_offset = start;