diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-12-06 15:56:20 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-18 14:59:51 +0100 |
commit | ea9ed87c73e87e044b2c58d658eb4ba5216bc488 (patch) | |
tree | 4fd227578fb8efa2fd0d614ecd4ff70822bc518a /fs/quota/quota_tree.h | |
parent | 675a4fc8f3149e93f35fb5739fd8d4764206ba0b (diff) |
btrfs: fix async discard stall
Might happen that bg->discard_eligible_time was changed without
rescheduling, so btrfs_discard_workfn() wakes up earlier than that new
time, peek_discard_list() returns NULL, and all work halts and goes to
sleep without further rescheduling even there are block groups to
discard.
It happens pretty often, but not so visible from the userspace because
after some time it usually will be kicked off anyway by someone else
calling btrfs_discard_reschedule_work().
Fix it by continue rescheduling if block group discard lists are not
empty.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/quota/quota_tree.h')
0 files changed, 0 insertions, 0 deletions