Commit 6728f8f8 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: BCH_ERR_insufficient_journal_devices



kill another standard error code use

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 3f1cf04f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)		\
+2 −3
Original line number Diff line number Diff line
@@ -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)