summaryrefslogtreecommitdiff
path: root/fs/bcachefs/movinggc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-12-28 05:28:50 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:20 +0300
commit200472e91c6c6745e6ddf42d1b33265f84b26e68 (patch)
treea2f6720c3d3b7d29d4784bb054bd01003362376a /fs/bcachefs/movinggc.c
parent74ef5b0d3f3f8e290686b309ae595559a8963fde (diff)
downloadlinux-200472e91c6c6745e6ddf42d1b33265f84b26e68.tar.xz
bcachefs: Add an error message for copygc spinning
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/movinggc.c')
-rw-r--r--fs/bcachefs/movinggc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c
index 346b9ee667ec..46a0875135d5 100644
--- a/fs/bcachefs/movinggc.c
+++ b/fs/bcachefs/movinggc.c
@@ -205,6 +205,11 @@ static int bch2_copygc(struct bch_fs *c)
up_read(&ca->bucket_lock);
}
+ if (!h->used) {
+ bch_err_ratelimited(c, "copygc requested to run but found no buckets to move!");
+ return 0;
+ }
+
/*
* Our btree node allocations also come out of RESERVE_MOVINGGC:
*/