aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ordered-data.h
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2008-10-30 14:25:28 -0400
committerChris Mason <chris.mason@oracle.com>2008-10-30 14:25:28 -0400
commitd899e05215178fed903ad0e7fc1cb4d8e0cc0a88 (patch)
tree2969e3558f5c50ec0f9ac4201099c0d5d1d6e2c2 /fs/btrfs/ordered-data.h
parent80ff385665b7fca29fefe358a60ab0d09f9b8e87 (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/ordered-data.h')
-rw-r--r--fs/btrfs/ordered-data.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h
index e6d9bc54c2b1..260bf95dfe0c 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -68,6 +68,8 @@ struct btrfs_ordered_sum {
68 68
69#define BTRFS_ORDERED_COMPRESSED 3 /* writing a compressed extent */ 69#define BTRFS_ORDERED_COMPRESSED 3 /* writing a compressed extent */
70 70
71#define BTRFS_ORDERED_PREALLOC 4 /* set when writing to prealloced extent */
72
71struct btrfs_ordered_extent { 73struct btrfs_ordered_extent {
72 /* logical offset in the file */ 74 /* logical offset in the file */
73 u64 file_offset; 75 u64 file_offset;
@@ -132,7 +134,7 @@ int btrfs_remove_ordered_extent(struct inode *inode,
132int btrfs_dec_test_ordered_pending(struct inode *inode, 134int btrfs_dec_test_ordered_pending(struct inode *inode,
133 u64 file_offset, u64 io_size); 135 u64 file_offset, u64 io_size);
134int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset, 136int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
135 u64 start, u64 len, u64 disk_len, int type); 137 u64 start, u64 len, u64 disk_len, int tyep);
136int btrfs_add_ordered_sum(struct inode *inode, 138int btrfs_add_ordered_sum(struct inode *inode,
137 struct btrfs_ordered_extent *entry, 139 struct btrfs_ordered_extent *entry,
138 struct btrfs_ordered_sum *sum); 140 struct btrfs_ordered_sum *sum);