mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08: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:
parent
97328a1a3c
commit
6d61724b2b
@ -1070,6 +1070,12 @@ again:
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user