summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-12-28 02:28:41 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2019-12-28 02:28:41 +0100
commitbf8d1cd4386535004c4afe7f03d37f9864c9940e (patch)
treedd73f0691e687860ed81e612e9a8d9847ed8c152 /drivers/target
parentMerge tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm (diff)
parentscsi: target/iblock: Fix protection error with blocks greater than 512B (diff)
downloadlinux-bf8d1cd4386535004c4afe7f03d37f9864c9940e.tar.xz
linux-bf8d1cd4386535004c4afe7f03d37f9864c9940e.zip
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Four fixes and one spelling update, all in drivers: two in lpfc and the rest in mp3sas, cxgbi and target" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target/iblock: Fix protection error with blocks greater than 512B scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy() scsi: lpfc: fix spelling mistakes of asynchronous scsi: lpfc: fix build failure with DEBUGFS disabled scsi: mpt3sas: Fix double free in attach error handling
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_iblock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 6949ea8bc387..51ffd5c002de 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -646,7 +646,9 @@ iblock_alloc_bip(struct se_cmd *cmd, struct bio *bio,
}
bip->bip_iter.bi_size = bio_integrity_bytes(bi, bio_sectors(bio));
- bip_set_seed(bip, bio->bi_iter.bi_sector);
+ /* virtual start sector must be in integrity interval units */
+ bip_set_seed(bip, bio->bi_iter.bi_sector >>
+ (bi->interval_exp - SECTOR_SHIFT));
pr_debug("IBLOCK BIP Size: %u Sector: %llu\n", bip->bip_iter.bi_size,
(unsigned long long)bip->bip_iter.bi_sector);