diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2008-10-30 14:25:28 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-10-30 14:25:28 -0400 |
commit | d899e05215178fed903ad0e7fc1cb4d8e0cc0a88 (patch) | |
tree | 2969e3558f5c50ec0f9ac4201099c0d5d1d6e2c2 /fs/btrfs/ioctl.c | |
parent | 80ff385665b7fca29fefe358a60ab0d09f9b8e87 (diff) |
Btrfs: Add fallocate support v2
This patch updates btrfs-progs for fallocate support.
fallocate is a little different in Btrfs because we need to tell the
COW system that a given preallocated extent doesn't need to be
cow'd as long as there are no snapshots of it. This leverages the
-o nodatacow checks.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 7f915d478399..9ff2b4e0e922 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -724,7 +724,8 @@ long btrfs_ioctl_clone(struct file *file, unsigned long src_fd) | |||
724 | extent = btrfs_item_ptr(leaf, slot, | 724 | extent = btrfs_item_ptr(leaf, slot, |
725 | struct btrfs_file_extent_item); | 725 | struct btrfs_file_extent_item); |
726 | found_type = btrfs_file_extent_type(leaf, extent); | 726 | found_type = btrfs_file_extent_type(leaf, extent); |
727 | if (found_type == BTRFS_FILE_EXTENT_REG) { | 727 | if (found_type == BTRFS_FILE_EXTENT_REG || |
728 | found_type == BTRFS_FILE_EXTENT_PREALLOC) { | ||
728 | u64 ds = btrfs_file_extent_disk_bytenr(leaf, | 729 | u64 ds = btrfs_file_extent_disk_bytenr(leaf, |
729 | extent); | 730 | extent); |
730 | u64 dl = btrfs_file_extent_disk_num_bytes(leaf, | 731 | u64 dl = btrfs_file_extent_disk_num_bytes(leaf, |