btrfs: extent-tree: Switch to new check_data_free_space and free_reserved_data_space
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Tue, 8 Sep 2015 09:22:43 +0000 (17:22 +0800)
committerChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:41:04 +0000 (18:41 -0700)
commitd9d8b2a51a404c2d45b9dc4c755f62cb3ddb7c79
tree4405c3e139e22e0ae72f3080340eb7ce1da28d89
parent4ceff0792d36256a5f879cec51c56e44db90b8ec
btrfs: extent-tree: Switch to new check_data_free_space and free_reserved_data_space

Use new reserve/free for buffered write and inode cache.

For buffered write case, as nodatacow write won't increase quota account,
so unlike old behavior which does reserve before check nocow, now we
check nocow first and then only reserve data if we can't do nocow write.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent-tree.c
fs/btrfs/file.c
fs/btrfs/relocation.c