]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: make BTRFS_RESERVE_FLUSH_EVICT use the global rsv stealing code
authorJosef Bacik <josef@toxicpanda.com>
Tue, 9 Nov 2021 15:12:04 +0000 (10:12 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Jan 2022 14:09:45 +0000 (15:09 +0100)
commitabdf773bac032fc7e6d0c5d281d6acfdc36e3d92
tree600ce87c693b2e6cdcec8c3ec4853a751c4a5e45
parentfd47e130252b38afa8852ab3c15129d06c8d096d
btrfs: make BTRFS_RESERVE_FLUSH_EVICT use the global rsv stealing code

I forgot to convert this over when I introduced the global reserve
stealing code to the space flushing code.  Evict was simply trying to
make its reservation and then if it failed it would steal from the
global rsv, which is racey because it's outside of the normal ticketing
code.

Fix this by setting ticket->steal if we are BTRFS_RESERVE_FLUSH_EVICT,
and then make the priority flushing path do the steal for us.

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/inode.c
fs/btrfs/space-info.c