Commit a0645965 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Silence extent_poisoned error messages



extent poisoning is partly so that we don't keep spewing the dmesg log
when we've got unreadable data - we don't want to print these.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 8692c7db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@
	x(EIO,				mark_stripe)				\
	x(EIO,				stripe_reconstruct)			\
	x(EIO,				key_type_error)				\
	x(EIO,				extent_poisened)			\
	x(EIO,				extent_poisoned)			\
	x(EIO,				missing_indirect_extent)		\
	x(EIO,				invalidate_stripe_to_dev)		\
	x(EIO,				no_encryption_key)			\
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ int bch2_bkey_pick_read_device(struct bch_fs *c, struct bkey_s_c k,
	struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(k);

	if (bch2_bkey_extent_ptrs_flags(ptrs) & BIT_ULL(BCH_EXTENT_FLAG_poisoned))
		return -BCH_ERR_extent_poisened;
		return -BCH_ERR_extent_poisoned;

	rcu_read_lock();
	const union bch_extent_entry *entry;
+10 −8
Original line number Diff line number Diff line
@@ -1349,14 +1349,16 @@ int __bch2_read(struct btree_trans *trans, struct bch_read_bio *rbio,

	bch2_trans_iter_exit(trans, &iter);

	if (ret) {
	if (unlikely(ret)) {
		if (ret != -BCH_ERR_extent_poisoned) {
			struct printbuf buf = PRINTBUF;
			lockrestart_do(trans,
				       bch2_inum_offset_err_msg_trans(trans, &buf, inum,
								      bvec_iter.bi_sector << 9));
		prt_printf(&buf, "read error: %s", bch2_err_str(ret));
			prt_printf(&buf, "data read error: %s", bch2_err_str(ret));
			bch_err_ratelimited(c, "%s", buf.buf);
			printbuf_exit(&buf);
		}

		rbio->bio.bi_status	= BLK_STS_IOERR;
		rbio->ret		= ret;