Commit b1c945b3 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Run freespace init in device hot add path

Like in the recovery, and device add, we have to check if devices don't
have the freespace btree initialized - this was missed in the device hot
add path.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 0fb11e08
......@@ -1743,6 +1743,10 @@ int bch2_dev_online(struct bch_fs *c, const char *path)
bch2_write_super(c);
mutex_unlock(&c->sb_lock);
ret = bch2_fs_freespace_init(c);
if (ret)
bch_err(c, "device add error: error initializing free space: %s", bch2_err_str(ret));
up_write(&c->state_lock);
return 0;
err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment