]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: rip the first_ticket_bytes logic from fail_all_tickets
authorJosef Bacik <josef@toxicpanda.com>
Tue, 22 Jun 2021 12:52:00 +0000 (15:52 +0300)
committerDavid Sterba <dsterba@suse.com>
Tue, 22 Jun 2021 12:51:48 +0000 (14:51 +0200)
commitd444d9f4cbe305c756b1ddfbb0609a6f79251bcb
tree58c402e1ea484eb5b0bed31945376553cab82ef2
parent2c78c0543f6c46b62a88c70a48019e46dccf9f51
btrfs: rip the first_ticket_bytes logic from fail_all_tickets

This was a trick implemented to handle the case where we had a giant
reservation in front of a bunch of little reservations in the ticket
queue.  If the giant reservation was too large for the transaction
commit to make a difference we'd ENOSPC everybody out instead of
committing the transaction.  This logic was put in to force us to go
back and re-try the transaction commit logic to see if we could make
progress.

Instead now we know we've committed the transaction, so any space that
would have been recovered is now available, and would be caught by the
btrfs_try_granting_tickets() in this loop, so we no longer need this
code and can simply delete it.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c