bcachefs: Add a cond_resched call to the copygc main loop

We seem to have a bug where the copygc thread ends up spinning and
making the system unusable - this will at least prevent it from locking
up the machine, and it's a good thing to have anyways.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2021-05-25 18:42:05 -04:00 committed by Kent Overstreet
parent 443d2760e5
commit c4d4b2f01a

View File

@ -317,6 +317,8 @@ static int bch2_copygc_thread(void *arg)
set_freezable();
while (!kthread_should_stop()) {
cond_resched();
if (kthread_wait_freezable(c->copy_gc_enabled))
break;