summaryrefslogtreecommitdiff
path: root/libbcachefs/movinggc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/movinggc.c')
-rw-r--r--libbcachefs/movinggc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbcachefs/movinggc.c b/libbcachefs/movinggc.c
index 28dabca7..7bef4561 100644
--- a/libbcachefs/movinggc.c
+++ b/libbcachefs/movinggc.c
@@ -241,7 +241,8 @@ static int bch2_copygc_thread(void *arg)
ca->mi.bucket_size;
if (available > reserve) {
next = last + available - reserve;
- bch2_kthread_io_clock_wait(clock, next);
+ bch2_kthread_io_clock_wait(clock, next,
+ MAX_SCHEDULE_TIMEOUT);
continue;
}
@@ -252,7 +253,8 @@ static int bch2_copygc_thread(void *arg)
fragmented = usage.sectors_fragmented;
if (fragmented < reserve) {
next = last + reserve - fragmented;
- bch2_kthread_io_clock_wait(clock, next);
+ bch2_kthread_io_clock_wait(clock, next,
+ MAX_SCHEDULE_TIMEOUT);
continue;
}