From a241f356f3405b0acd0dded62261d92ba621c433 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Sat, 27 Jun 2009 21:07:03 -0400 Subject: [PATCH] --- yaml --- r: 154806 b: refs/heads/master c: c8a894d77de4a1e0a544577fd4eabc9aacd453a8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/ioctl.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 913e2b7a0ffe..6f0909339e0c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f597bb19ccd034cbcf05e1194238e2c8d9505a8a +refs/heads/master: c8a894d77de4a1e0a544577fd4eabc9aacd453a8 diff --git a/trunk/fs/btrfs/ioctl.c b/trunk/fs/btrfs/ioctl.c index eff18f5b5362..9f4db848db10 100644 --- a/trunk/fs/btrfs/ioctl.c +++ b/trunk/fs/btrfs/ioctl.c @@ -1028,7 +1028,8 @@ static long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, struct btrfs_file_extent_item); comp = btrfs_file_extent_compression(leaf, extent); type = btrfs_file_extent_type(leaf, extent); - if (type == BTRFS_FILE_EXTENT_REG) { + if (type == BTRFS_FILE_EXTENT_REG || + type == BTRFS_FILE_EXTENT_PREALLOC) { disko = btrfs_file_extent_disk_bytenr(leaf, extent); diskl = btrfs_file_extent_disk_num_bytes(leaf, @@ -1051,7 +1052,8 @@ static long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, new_key.objectid = inode->i_ino; new_key.offset = key.offset + destoff - off; - if (type == BTRFS_FILE_EXTENT_REG) { + if (type == BTRFS_FILE_EXTENT_REG || + type == BTRFS_FILE_EXTENT_PREALLOC) { ret = btrfs_insert_empty_item(trans, root, path, &new_key, size); if (ret)