projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97328a1
)
bcachefs: Shut down quicker
author
Kent Overstreet
<kent.overstreet@gmail.com>
Wed, 18 Mar 2020 15:46:46 +0000
(11:46 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:37 +0000
(17:08 -0400)
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>
fs/bcachefs/io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/io.c
b/fs/bcachefs/io.c
index 2ec7203e582487d1ea9291878cee6773267dd6d6..3dcb166afa231c72af2e27ae3573ee5ebcabd482 100644
(file)
--- a/
fs/bcachefs/io.c
+++ b/
fs/bcachefs/io.c
@@
-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,