summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/rebalance.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-02-23 21:16:41 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:08:53 +0200
commitdab9ef0d271648c24b867059855439ec48775fc4 (patch)
treeddf192029855fb6b9498f5318e169e563397652c /fs/bcachefs/rebalance.c
parentbcachefs: Extents may now cross btree node boundaries (diff)
downloadlinux-dab9ef0d271648c24b867059855439ec48775fc4.tar.xz
linux-dab9ef0d271648c24b867059855439ec48775fc4.zip
bcachefs: Add error message for some allocation failures
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/rebalance.c')
-rw-r--r--fs/bcachefs/rebalance.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/rebalance.c b/fs/bcachefs/rebalance.c
index 2263ee41c444..c75411af4622 100644
--- a/fs/bcachefs/rebalance.c
+++ b/fs/bcachefs/rebalance.c
@@ -315,8 +315,10 @@ int bch2_rebalance_start(struct bch_fs *c)
return 0;
p = kthread_create(bch2_rebalance_thread, c, "bch-rebalance/%s", c->name);
- if (IS_ERR(p))
+ if (IS_ERR(p)) {
+ bch_err(c, "error creating rebalance thread: %li", PTR_ERR(p));
return PTR_ERR(p);
+ }
get_task_struct(p);
rcu_assign_pointer(c->rebalance.thread, p);