]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: Read error message now prints if self healing
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 7 Jun 2025 18:22:24 +0000 (14:22 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 12 Jun 2025 03:21:30 +0000 (23:21 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/io_read.c
fs/bcachefs/io_read.h

index a77779afad01157eb48af5ea31772f3105c2e237..04bbdcf58e40398dfc31473665661da3efe26241 100644 (file)
@@ -343,6 +343,10 @@ static struct bch_read_bio *promote_alloc(struct btree_trans *trans,
 
        *bounce         = true;
        *read_full      = promote_full;
+
+       if (have_io_error(failed))
+               orig->self_healing = true;
+
        return promote;
 nopromote:
        trace_io_read_nopromote(c, ret);
@@ -635,12 +639,15 @@ static void bch2_rbio_retry(struct work_struct *work)
                        prt_str(&buf, "(internal move) ");
 
                prt_str(&buf, "data read error, ");
-               if (!ret)
+               if (!ret) {
                        prt_str(&buf, "successful retry");
-               else
+                       if (rbio->self_healing)
+                               prt_str(&buf, ", self healing");
+               } else
                        prt_str(&buf, bch2_err_str(ret));
                prt_newline(&buf);
 
+
                if (!bkey_deleted(&sk.k->k)) {
                        bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(sk.k));
                        prt_newline(&buf);
index 45c959018919a76188ab776a0a4332ab57bddfaa..9c5ddbf861b39cc647ed190e4e76c54fb1373cb8 100644 (file)
@@ -44,6 +44,7 @@ struct bch_read_bio {
                                have_ioref:1,
                                narrow_crcs:1,
                                saw_error:1,
+                               self_healing:1,
                                context:2;
        };
        u16                     _state;