Commit 6d61724b authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Shut down quicker

Internal writes (i.e. copygc/rebalance operations) shouldn't be blocking
on the allocator when we're going RO.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 97328a1a
......@@ -1070,6 +1070,12 @@ static void __bch2_write(struct closure *cl)
BKEY_EXTENT_U64s_MAX))
goto flush_io;
if ((op->flags & BCH_WRITE_FROM_INTERNAL) &&
percpu_ref_is_dying(&c->writes)) {
ret = -EROFS;
goto err;
}
wp = bch2_alloc_sectors_start(c,
op->target,
op->opts.erasure_code,
......
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