mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
strip_alloc: Also kill in-memory replicas
Make sure superblock writes don't fail due to leftovers. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
5155014de4
commit
18d81cb0ed
@ -52,6 +52,12 @@ void strip_fs_alloc(struct bch_fs *c)
|
||||
swap(u64s, clean->field.u64s);
|
||||
bch2_sb_field_resize(&c->disk_sb, clean, u64s);
|
||||
|
||||
scoped_guard(percpu_write, &c->mark_lock) {
|
||||
kfree(c->replicas.entries);
|
||||
c->replicas.entries = NULL;
|
||||
c->replicas.nr = 0;
|
||||
}
|
||||
|
||||
bch2_sb_field_resize(&c->disk_sb, replicas_v0, 0);
|
||||
bch2_sb_field_resize(&c->disk_sb, replicas, 0);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user