diff options
author | Qu Wenruo | 2015-09-08 17:25:56 +0800 |
---|---|---|
committer | Chris Mason | 2015-10-21 18:41:07 -0700 |
commit | 94ed938aba557aa798acf496f09afb289b619fcd (patch) | |
tree | 967880fccfe272df0fb1a87fc0208d68714ba357 /fs/btrfs/extent-tree.c | |
parent | 7cf5b97650f2ecefbd5afa2d58b61b289b6e3750 (diff) |
btrfs: qgroup: Add handler for NOCOW and inline
For NOCOW and inline case, there will be no delayed_ref created for
them, so we should free their reserved data space at proper
time(finish_ordered_io for NOCOW and cow_file_inline for inline).
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 3a23225e83f4..aaaa7746685a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4052,7 +4052,12 @@ int btrfs_check_data_free_space(struct inode *inode, u64 start, u64 len) if (ret < 0) return ret; - /* Use new btrfs_qgroup_reserve_data to reserve precious data space */ + /* + * Use new btrfs_qgroup_reserve_data to reserve precious data space + * + * TODO: Find a good method to avoid reserve data space for NOCOW + * range, but don't impact performance on quota disable case. + */ ret = btrfs_qgroup_reserve_data(inode, start, len); return ret; } |