bcachefs: BCH_ERR_insufficient_journal_devices

kill another standard error code use

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet
2024-12-04 17:53:38 -05:00
parent 3f1cf04ff9
commit 6728f8f829
2 changed files with 3 additions and 3 deletions

View File

@@ -263,6 +263,7 @@
x(EIO, missing_indirect_extent) \
x(EIO, invalidate_stripe_to_dev) \
x(EIO, no_encryption_key) \
x(EIO, insufficient_journal_devices) \
x(BCH_ERR_btree_node_read_err, btree_node_read_err_fixable) \
x(BCH_ERR_btree_node_read_err, btree_node_read_err_want_retry) \
x(BCH_ERR_btree_node_read_err, btree_node_read_err_must_retry) \

View File

@@ -1503,8 +1503,7 @@ static int journal_write_alloc(struct journal *j, struct journal_buf *w)
devs_sorted = bch2_dev_alloc_list(c, &j->wp.stripe, &devs);
__journal_write_alloc(j, w, &devs_sorted,
sectors, &replicas, replicas_want);
__journal_write_alloc(j, w, &devs_sorted, sectors, &replicas, replicas_want);
if (replicas >= replicas_want)
goto done;
@@ -1544,7 +1543,7 @@ static int journal_write_alloc(struct journal *j, struct journal_buf *w)
BUG_ON(bkey_val_u64s(&w->key.k) > BCH_REPLICAS_MAX);
return replicas >= replicas_need ? 0 : -EROFS;
return replicas >= replicas_need ? 0 : -BCH_ERR_insufficient_journal_devices;
}
static void journal_buf_realloc(struct journal *j, struct journal_buf *buf)