]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: check tickets after waiting on ordered extents
authorJosef Bacik <josef@toxicpanda.com>
Tue, 21 Jul 2020 14:22:22 +0000 (10:22 -0400)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:06:52 +0000 (12:06 +0200)
commit2e13127b54209982a0d945123552e948a99cfa41
treec4014950b5f1a50d83173fe65afcf8c4b8f5ae9c
parent363990706e2014214022247cdadc298e2aff7f8a
btrfs: check tickets after waiting on ordered extents

Right now if the space is freed up after the ordered extents complete
(which is likely since the reservations are held until they complete),
we would do extra delalloc flushing before we'd notice that we didn't
have any more tickets.  Fix this by moving the tickets check after our
wait_ordered_extents check.

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