Skip to contentSkip to conversation

block: Dedicated error code fixups

PATCH In review Bart Van Assche 4 participants 4 messages Jun 13, 2017 – Jun 16, 2017 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Dedicated error code fixups

This patch fixes two sparse warnings introduced by the "dedicated error codes for the block layer V3" patch series. These changes have not been tested.

Cc Christoph Hellwig <[email protected]>
---
 block/bio.c    | 4 ++--
 block/t10-pi.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
block/bio.c +2 -2
index 7a5c8ed27f42..0e36ca5407b5 100644
@@ -1817,8 +1817,8 @@ void bio_endio(struct bio *bio)
 	}
 
 	if (bio->bi_bdev && bio_flagged(bio, BIO_TRACE_COMPLETION)) {
-		trace_block_bio_complete(bdev_get_queue(bio->bi_bdev),
-					 bio, bio->bi_status);
+		trace_block_bio_complete(bdev_get_queue(bio->bi_bdev), bio,
+					 blk_status_to_errno(bio->bi_status));
 		bio_clear_flag(bio, BIO_TRACE_COMPLETION);
 	}
 
block/t10-pi.c +1 -1
index 350b3cbcf9e5..3416dadf7b15 100644
@@ -91,7 +91,7 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
 				       "(rcvd %u)\n", iter->disk_name,
 				       (unsigned long long)
 				       iter->seed, be32_to_cpu(pi->ref_tag));
-				return -EILSEQ;
+				return BLK_STS_PROTECTION;
 			}
 			break;
 		case 3:
Signature · 1 line
2.12.2
#1 lore raw

Bart,

Quoted 3 lines

This patch fixes two sparse warnings introduced by the "dedicated error codes for the block layer V3" patch series. These changes have not been tested.

LGTM.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
maintainer
#3 lore raw
In reply to Bart Van Assche
Quoted 3 lines · Bart Van Assche

This patch fixes two sparse warnings introduced by the "dedicated error codes for the block layer V3" patch series. These changes have not been tested.

Added, thanks Bart.

Signature · 1 line
Jens Axboe