Thread (5 messages) 5 messages, 2 authors, 2018-07-26

Re: [PATCH 0/2] virtio_scsi pi_bytes{out,in} miscalculated on 4 KiB devices

From: Jens Axboe <axboe@kernel.dk>
Date: 2018-07-26 21:49:59

On 7/25/18 7:22 AM, Greg Edwards wrote:
When the VIRTIO_SCSI_F_T10_PI feature bit is enabled, the virtio_scsi driver
does not correctly calculate pi_bytes{out,in} when the underlying device has a
4 KiB logical block size.  The current code assumes a 512 byte logical block
size and protection interval exponent of 0 (512 bytes + 8 bytes PI).

The first patch moves bio_integrity_intervals() and bio_integrity_bytes() into
blkdev.h so drivers can make use of them.  The second patch modifies
virtio_scsi to call bio_integrity_bytes() to get the values for
pi_bytes{out,in}.
Applied, thanks.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help