diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-27 21:28:50 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-01-05 19:33:45 -0500 |
commit | 2fcf14692b8c049b7f133d1da8c68e697b7f132e (patch) | |
tree | 5204e9d86f9a8aaa6fc00dd47ef80444672bb02c | |
parent | c6da58b62df2964420dddbf6fbe0b668ef68ae65 (diff) |
bcachefs: Add an error message for copygc spinning
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/movinggc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index 7b7eee9b1773..7cd1b0cf27e4 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: */ |