mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 07:04:44 +00:00
bcachefs: Dont't del sysfs dir until after we go RO
This will help for debugging hangs during unmount Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
38f0664a5f
commit
883f1a7ce0
1 changed files with 4 additions and 4 deletions
|
@ -518,6 +518,10 @@ void bch2_fs_stop(struct bch_fs *c)
|
||||||
|
|
||||||
cancel_work_sync(&c->journal_seq_blacklist_gc_work);
|
cancel_work_sync(&c->journal_seq_blacklist_gc_work);
|
||||||
|
|
||||||
|
mutex_lock(&c->state_lock);
|
||||||
|
bch2_fs_read_only(c);
|
||||||
|
mutex_unlock(&c->state_lock);
|
||||||
|
|
||||||
for_each_member_device(ca, c, i)
|
for_each_member_device(ca, c, i)
|
||||||
if (ca->kobj.state_in_sysfs &&
|
if (ca->kobj.state_in_sysfs &&
|
||||||
ca->disk_sb.bdev)
|
ca->disk_sb.bdev)
|
||||||
|
@ -540,10 +544,6 @@ void bch2_fs_stop(struct bch_fs *c)
|
||||||
closure_sync(&c->cl);
|
closure_sync(&c->cl);
|
||||||
closure_debug_destroy(&c->cl);
|
closure_debug_destroy(&c->cl);
|
||||||
|
|
||||||
mutex_lock(&c->state_lock);
|
|
||||||
bch2_fs_read_only(c);
|
|
||||||
mutex_unlock(&c->state_lock);
|
|
||||||
|
|
||||||
/* btree prefetch might have kicked off reads in the background: */
|
/* btree prefetch might have kicked off reads in the background: */
|
||||||
bch2_btree_flush_all_reads(c);
|
bch2_btree_flush_all_reads(c);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue