mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00: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