1 When sector offset is larger then 2^32, the mapping from physical
2 reference tag to the virtual values expected by block layer will be
4 Linux-commit: c611529e7cd3465ec0eada0f44200e8420c38908
6 Index: linux-3.10.0-693.21.1.el7.x86_64/drivers/scsi/sd_dif.c
7 ===================================================================
8 --- linux-3.10.0-693.21.1.el7.x86_64.orig/drivers/scsi/sd_dif.c
9 +++ linux-3.10.0-693.21.1.el7.x86_64/drivers/scsi/sd_dif.c
10 @@ -416,6 +416,7 @@ void sd_dif_complete(struct scsi_cmnd *s
11 struct sd_dif_tuple *sdt;
12 unsigned int i, j, sectors, sector_sz;
16 sdkp = scsi_disk(scmd->request->rq_disk);
18 @@ -425,9 +426,10 @@ void sd_dif_complete(struct scsi_cmnd *s
19 sector_sz = scmd->device->sector_size;
20 sectors = good_bytes / sector_sz;
22 - phys = blk_rq_pos(scmd->request) & 0xffffffff;
23 + sector = blk_rq_pos(scmd->request);
24 if (sector_sz == 4096)
27 + phys = sector & 0xffffffff;
29 __rq_for_each_bio(bio, scmd->request) {