]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: only check delayed ref usage in should_end_transaction
authorJosef Bacik <josef@toxicpanda.com>
Fri, 29 Sep 2017 19:43:51 +0000 (15:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:28:00 +0000 (12:28 +0100)
commit9323886e94a97d1c4f3ff722882239867c716065
tree3304f759e0451561b124f8f52c930b9513fa95dd
parent24471c3fac5acc22a903620d7345c6aa8a2f891b
Btrfs: only check delayed ref usage in should_end_transaction

We were only doing btrfs_check_space_for_delayed_refs() if the metadata
space was full, ie we couldn't allocate chunks.  This assumes we'll be
able to allocate chunks during transaction commit, but since nothing
does a LIMIT flush during the transaction commit this won't actually
happen unless we happen to run shy of actual space.  We already take
into account a full fs in btrfs_check_space_for_delayed_refs() so just
kill this extra check to make sure we're ending the transaction when we
need to.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c