diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-08-24 16:05:04 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-08-24 16:25:05 -0400 |
commit | cd9892e543845e045142ed29e4a5a9ce446a205e (patch) | |
tree | 1556289a5366d5cdfff32f9669cf748e39ed5063 /linux | |
parent | 21ade396535e51503511f42ea06d58e25c0646c5 (diff) |
Update bcachefs sources to 10ab39f2fa bcachefs: Improvements to the journal read error paths
Diffstat (limited to 'linux')
-rw-r--r-- | linux/bio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linux/bio.c b/linux/bio.c index 797204f8..8422c262 100644 --- a/linux/bio.c +++ b/linux/bio.c @@ -52,6 +52,15 @@ int blk_status_to_errno(blk_status_t status) return blk_errors[idx].err; } +const char *blk_status_to_str(blk_status_t status) +{ + int idx = (__force int)status; + + if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors))) + return "(invalid error)"; + return blk_errors[idx].name; +} + void bio_copy_data_iter(struct bio *dst, struct bvec_iter *dst_iter, struct bio *src, struct bvec_iter *src_iter) { |