aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-09-06 06:02:28 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-01 15:19:11 -0400
commit66d8f3dd1c87813d7f1cf8b774cb03e9b8d7e87e (patch)
tree74d18d716f42e15958a9723ece4cd98dfdfd6a74 /fs/btrfs/ioctl.c
parent6352b91da1a2108bb8cc5115e8714f90d706f15f (diff)
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/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 5543fd562b55..e6934de55a8b 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -516,7 +516,8 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry,
516 if (!pending_snapshot) 516 if (!pending_snapshot)
517 return -ENOMEM; 517 return -ENOMEM;
518 518
519 btrfs_init_block_rsv(&pending_snapshot->block_rsv); 519 btrfs_init_block_rsv(&pending_snapshot->block_rsv,
520 BTRFS_BLOCK_RSV_TEMP);
520 pending_snapshot->dentry = dentry; 521 pending_snapshot->dentry = dentry;
521 pending_snapshot->root = root; 522 pending_snapshot->root = root;
522 pending_snapshot->readonly = readonly; 523 pending_snapshot->readonly = readonly;