Skip to content

Commit dd22844

Browse files
author
Kent Overstreet
committed
bcachefs: Read error message now prints if self healing
Signed-off-by: Kent Overstreet <[email protected]>
1 parent b47a82f commit dd22844

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

fs/bcachefs/io_read.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ static struct bch_read_bio *promote_alloc(struct btree_trans *trans,
343343

344344
*bounce = true;
345345
*read_full = promote_full;
346+
347+
if (have_io_error(failed))
348+
orig->self_healing = true;
349+
346350
return promote;
347351
nopromote:
348352
trace_io_read_nopromote(c, ret);
@@ -635,12 +639,15 @@ static void bch2_rbio_retry(struct work_struct *work)
635639
prt_str(&buf, "(internal move) ");
636640

637641
prt_str(&buf, "data read error, ");
638-
if (!ret)
642+
if (!ret) {
639643
prt_str(&buf, "successful retry");
640-
else
644+
if (rbio->self_healing)
645+
prt_str(&buf, ", self healing");
646+
} else
641647
prt_str(&buf, bch2_err_str(ret));
642648
prt_newline(&buf);
643649

650+
644651
if (!bkey_deleted(&sk.k->k)) {
645652
bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(sk.k));
646653
prt_newline(&buf);

fs/bcachefs/io_read.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ struct bch_read_bio {
4444
have_ioref:1,
4545
narrow_crcs:1,
4646
saw_error:1,
47+
self_healing:1,
4748
context:2;
4849
};
4950
u16 _state;

0 commit comments

Comments
 (0)