diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-27 21:28:50 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:20 -0400 |
commit | 200472e91c6c6745e6ddf42d1b33265f84b26e68 (patch) | |
tree | a2f6720c3d3b7d29d4784bb054bd01003362376a /fs/bcachefs/movinggc.c | |
parent | 74ef5b0d3f3f8e290686b309ae595559a8963fde (diff) |
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.c | 5 |
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: */ |