summaryrefslogtreecommitdiff
path: root/libbcachefs/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/io.c')
-rw-r--r--libbcachefs/io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbcachefs/io.c b/libbcachefs/io.c
index f0fca861..706f18bc 100644
--- a/libbcachefs/io.c
+++ b/libbcachefs/io.c
@@ -427,7 +427,7 @@ retry:
opts.data_replicas,
opts.data_replicas,
RESERVE_none, 0, &cl, &wp);
- if (ret == -EAGAIN) {
+ if (bch2_err_matches(ret, BCH_ERR_operation_blocked)) {
bch2_trans_unlock(trans);
closure_sync(&cl);
goto retry;
@@ -1627,7 +1627,7 @@ again:
BCH_WRITE_ONLY_SPECIFIED_DEVS))
? NULL : &op->cl, &wp));
if (unlikely(ret)) {
- if (ret == -EAGAIN)
+ if (bch2_err_matches(ret, BCH_ERR_operation_blocked))
break;
goto err;
@@ -1775,7 +1775,7 @@ void bch2_write(struct closure *cl)
if (c->opts.nochanges ||
!percpu_ref_tryget_live(&c->writes)) {
- op->error = -EROFS;
+ op->error = -BCH_ERR_erofs_no_writes;
goto err;
}