]> 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)
commiteb53840887a8e4afd08f75b7da1d3e84b827d4e1
treec4014950b5f1a50d83173fe65afcf8c4b8f5ae9c
parentcd75b8cc2e339ad7363a190c88cde4ef9a8053b3
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