]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: allow callers to specify if flushing can occur for btrfs_block_rsv_check
authorJosef Bacik <josef@redhat.com>
Fri, 19 Aug 2011 14:31:56 +0000 (10:31 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:17 +0000 (21:20 -0500)
commita34880c0c1906f6045d52fa5936dc256a41c88b6
treeecfa30a33ae539a82efe95398441378707c6e98b
parentd9b6bbfe79ca745cc959e4b21fdbff9aaafc00a6
Btrfs: allow callers to specify if flushing can occur for btrfs_block_rsv_check

If you run xfstest 224 it you will get lots of messages about not being able to
delete inodes and that they will be cleaned up next mount.  This is because
btrfs_block_rsv_check was not calling reserve_metadata_bytes with the ability to
flush, so if there was not enough space, it simply failed.  But in truncate and
evict case we could easily flush space to try and get enough space to do our
work, so make btrfs_block_rsv_check take a flush argument to pass down to
reserve_metadata_bytes.  Now xfstests 224 runs fine without all those
complaints.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit 482e6dc5261406fdb921946e70b51467b0305bad)
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/relocation.c
fs/btrfs/transaction.c