summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorGreg Edwards <gedwards@ddn.com>2018-09-04 11:19:10 -0600
committerMartin K. Petersen <martin.petersen@oracle.com>2018-09-20 22:27:00 -0400
commitfed564f6503bdfd57f6dc32b4a1e94b90b05e803 (patch)
treecbae9ff2fc5c577f392efb18c0b93ed23fcc68c0 /drivers/remoteproc
parent2b08adff433c85966ceb2cdb42a7986fad9040b5 (diff)
downloadlinux-fed564f6503bdfd57f6dc32b4a1e94b90b05e803.tar.gz
linux-fed564f6503bdfd57f6dc32b4a1e94b90b05e803.tar.bz2
linux-fed564f6503bdfd57f6dc32b4a1e94b90b05e803.zip
scsi: target: iblock: split T10 PI SGL across command bios
When T10 PI is enabled on a backing device for the iblock backstore, the PI SGL for the entire command is attached to the first bio only. This works fine if the command is covered by a single bio, but can result in ref tag errors in the client for the other bios in a multi-bio command, e.g. [ 47.631236] sda: ref tag error at location 2048 (rcvd 0) [ 47.637658] sda: ref tag error at location 4096 (rcvd 0) [ 47.644228] sda: ref tag error at location 6144 (rcvd 0) The command will be split into multiple bios if the number of data SG elements exceeds BIO_MAX_PAGES (see iblock_get_bio()). The bios may later be split again in the block layer on the host after iblock_submit_bios(), depending on the queue limits of the backing device. The block and SCSI layers will pass through the whole PI SGL down to the LLDD however that first bio is split up, but the LLDD may only use the portion that corresponds to the data length (depends on the LLDD, tested with scsi_debug). Split the PI SGL across the bios in the command, so each bio's bio_integrity_payload contains the protection information for the data in the bio. Use an sg_mapping_iter to keep track of where we are in PI SGL, so we know where to start with the next bio. Signed-off-by: Greg Edwards <gedwards@ddn.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/remoteproc')
0 files changed, 0 insertions, 0 deletions