All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: Dedicated error code fixups
@ 2017-06-13 15:07 Bart Van Assche
  2017-06-13 15:09 ` Martin K. Petersen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bart Van Assche @ 2017-06-13 15:07 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, 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.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
---
 block/bio.c    | 4 ++--
 block/t10-pi.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index 7a5c8ed27f42..0e36ca5407b5 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -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);
 	}
 
diff --git a/block/t10-pi.c b/block/t10-pi.c
index 350b3cbcf9e5..3416dadf7b15 100644
--- a/block/t10-pi.c
+++ b/block/t10-pi.c
@@ -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:
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: Dedicated error code fixups
  2017-06-13 15:07 [PATCH] block: Dedicated error code fixups Bart Van Assche
@ 2017-06-13 15:09 ` Martin K. Petersen
  2017-06-16 15:45 ` Christoph Hellwig
  2017-06-16 15:47 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2017-06-13 15:09 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Jens Axboe, linux-block, Christoph Hellwig


Bart,

> 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.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: Dedicated error code fixups
  2017-06-13 15:07 [PATCH] block: Dedicated error code fixups Bart Van Assche
  2017-06-13 15:09 ` Martin K. Petersen
@ 2017-06-16 15:45 ` Christoph Hellwig
  2017-06-16 15:47 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2017-06-16 15:45 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Jens Axboe, linux-block, Christoph Hellwig

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: Dedicated error code fixups
  2017-06-13 15:07 [PATCH] block: Dedicated error code fixups Bart Van Assche
  2017-06-13 15:09 ` Martin K. Petersen
  2017-06-16 15:45 ` Christoph Hellwig
@ 2017-06-16 15:47 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2017-06-16 15:47 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: linux-block, Christoph Hellwig

On 06/13/2017 09:07 AM, Bart Van Assche wrote:
> 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.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-16 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 15:07 [PATCH] block: Dedicated error code fixups Bart Van Assche
2017-06-13 15:09 ` Martin K. Petersen
2017-06-16 15:45 ` Christoph Hellwig
2017-06-16 15:47 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.