]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use the same helper for data and metadata reservations
authorJosef Bacik <josef@toxicpanda.com>
Tue, 21 Jul 2020 14:22:28 +0000 (10:22 -0400)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:06:53 +0000 (12:06 +0200)
commit89f72dfce3512595e55be546da49d80c1226a51c
treec382df51968f1260d6ea991a6b365066fdd2b6cd
parent461b5df8c85eca01d1e91dce16fb44c32b9288d9
btrfs: use the same helper for data and metadata reservations

Now that data reservations follow the same pattern as metadata
reservations we can simply rename __reserve_metadata_bytes to
__reserve_bytes and use that helper for data reservations.

Things to keep in mind, btrfs_can_overcommit() returns 0 for data,
because we can never overcommit.  We also will never pass in FLUSH_ALL
for data, so we'll simply be added to the priority list and go straight
into handle_reserve_ticket.

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