diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-07-02 13:43:58 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:42 -0400 |
commit | 306d40df7d27c99a8ec63fc730747a77959c4358 (patch) | |
tree | e0ad45548fb64893424a7f7675d73769baf98bdf /fs/bcachefs/io.c | |
parent | 52fbb7c859788bb10dc0f1527eedf80fd11ec9ec (diff) | |
download | lwn-306d40df7d27c99a8ec63fc730747a77959c4358.tar.gz lwn-306d40df7d27c99a8ec63fc730747a77959c4358.zip |
bcachefs: Use blk_status_to_str()
Improved error messages are always a good thing
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r-- | fs/bcachefs/io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index ca27e7dff5e0..5763654db310 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -624,7 +624,8 @@ static void bch2_write_endio(struct bio *bio) struct bch_fs *c = wbio->c; struct bch_dev *ca = bch_dev_bkey_exists(c, wbio->dev); - if (bch2_dev_io_err_on(bio->bi_status, ca, "data write")) + if (bch2_dev_io_err_on(bio->bi_status, ca, "data write: %s", + blk_status_to_str(bio->bi_status))) set_bit(wbio->dev, op->failed.d); if (wbio->have_ioref) { @@ -1913,7 +1914,8 @@ static void bch2_read_endio(struct bio *bio) if (!rbio->split) rbio->bio.bi_end_io = rbio->end_io; - if (bch2_dev_io_err_on(bio->bi_status, ca, "data read")) { + if (bch2_dev_io_err_on(bio->bi_status, ca, "data read; %s", + blk_status_to_str(bio->bi_status))) { bch2_rbio_error(rbio, READ_RETRY_AVOID, bio->bi_status); return; } |