mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 12:21:15 -04:00
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: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
97328a1a3c
commit
6d61724b2b
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user