diff options
author | Sage Weil <sage@newdream.net> | 2008-05-02 14:43:14 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:02 -0400 |
commit | f2eb0a241f0e5c135d93243b0236cb1f14c305e0 (patch) | |
tree | dd3141efb9142a294222b9195593371887519207 /fs/btrfs/file-item.c | |
parent | d6bfde8765668c8687de72f7a40f52acdf4f2f19 (diff) |
Btrfs: Clone file data ioctl
Add a new ioctl to clone file data
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 9259aece6ed1..f537eb43c2c6 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -28,10 +28,10 @@ | |||
28 | sizeof(struct btrfs_item) * 2) / \ | 28 | sizeof(struct btrfs_item) * 2) / \ |
29 | BTRFS_CRC32_SIZE) - 1)) | 29 | BTRFS_CRC32_SIZE) - 1)) |
30 | int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, | 30 | int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, |
31 | struct btrfs_root *root, | 31 | struct btrfs_root *root, |
32 | u64 objectid, u64 pos, | 32 | u64 objectid, u64 pos, |
33 | u64 offset, u64 disk_num_bytes, | 33 | u64 disk_offset, u64 disk_num_bytes, |
34 | u64 num_bytes) | 34 | u64 num_bytes, u64 offset) |
35 | { | 35 | { |
36 | int ret = 0; | 36 | int ret = 0; |
37 | struct btrfs_file_extent_item *item; | 37 | struct btrfs_file_extent_item *item; |
@@ -53,9 +53,9 @@ int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, | |||
53 | leaf = path->nodes[0]; | 53 | leaf = path->nodes[0]; |
54 | item = btrfs_item_ptr(leaf, path->slots[0], | 54 | item = btrfs_item_ptr(leaf, path->slots[0], |
55 | struct btrfs_file_extent_item); | 55 | struct btrfs_file_extent_item); |
56 | btrfs_set_file_extent_disk_bytenr(leaf, item, offset); | 56 | btrfs_set_file_extent_disk_bytenr(leaf, item, disk_offset); |
57 | btrfs_set_file_extent_disk_num_bytes(leaf, item, disk_num_bytes); | 57 | btrfs_set_file_extent_disk_num_bytes(leaf, item, disk_num_bytes); |
58 | btrfs_set_file_extent_offset(leaf, item, 0); | 58 | btrfs_set_file_extent_offset(leaf, item, offset); |
59 | btrfs_set_file_extent_num_bytes(leaf, item, num_bytes); | 59 | btrfs_set_file_extent_num_bytes(leaf, item, num_bytes); |
60 | btrfs_set_file_extent_generation(leaf, item, trans->transid); | 60 | btrfs_set_file_extent_generation(leaf, item, trans->transid); |
61 | btrfs_set_file_extent_type(leaf, item, BTRFS_FILE_EXTENT_REG); | 61 | btrfs_set_file_extent_type(leaf, item, BTRFS_FILE_EXTENT_REG); |