summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorMiao Xie2012-09-06 12:02:28 +0200
committerChris Mason2012-10-01 21:19:11 +0200
commit66d8f3dd1c87813d7f1cf8b774cb03e9b8d7e87e (patch)
tree74d18d716f42e15958a9723ece4cd98dfdfd6a74 /fs/btrfs/relocation.c
parentBtrfs: use a slab for ordered extents allocation (diff)
downloadkernel-qcow2-linux-66d8f3dd1c87813d7f1cf8b774cb03e9b8d7e87e.tar.gz
kernel-qcow2-linux-66d8f3dd1c87813d7f1cf8b774cb03e9b8d7e87e.tar.xz
kernel-qcow2-linux-66d8f3dd1c87813d7f1cf8b774cb03e9b8d7e87e.zip
Btrfs: add a new "type" field into the block reservation structure
Sometimes we need choose the method of the reservation according to the type of the block reservation, such as the reservation for the delayed inode update. Now we identify the type just by comparing the address of the reservation variants, it is very ugly if it is a temporary one because we need compare it with all the common reservation variants. So we add a new "type" field to keep the type the reservation variants. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 4da08652004d..5a15c96a18ff 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3674,7 +3674,8 @@ int prepare_to_relocate(struct reloc_control *rc)
struct btrfs_trans_handle *trans;
int ret;
- rc->block_rsv = btrfs_alloc_block_rsv(rc->extent_root);
+ rc->block_rsv = btrfs_alloc_block_rsv(rc->extent_root,
+ BTRFS_BLOCK_RSV_TEMP);
if (!rc->block_rsv)
return -ENOMEM;