scsi: target/core: Use the SECTOR_SHIFT constant

Instead of duplicating the SECTOR_SHIFT definition from <linux/blkdev.h>,
use it. This patch does not change any functionality.

Reviewed-by: Christoph Hellwig <[email protected]>
Cc: Nicholas Bellinger <[email protected]>
Cc: Mike Christie <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
Bart Van Assche authored and Martin K. Petersen committed 2018-10-16 01:13:35 -04:00
1 parent 5e568d22fc
commit 80b045b385
2 files changed
+2 -3

No files matched your search

+2 -2
View File
@@ -514,7 +514,7 @@ iblock_execute_write_same(struct se_cmd *cmd)
}
/* Always in 512 byte units for Linux/Block */
block_lba += sg->length >> IBLOCK_LBA_SHIFT;
block_lba += sg->length >> SECTOR_SHIFT;
sectors -= 1;
}
@@ -777,7 +777,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
}
/* Always in 512 byte units for Linux/Block */
block_lba += sg->length >> IBLOCK_LBA_SHIFT;
block_lba += sg->length >> SECTOR_SHIFT;
sg_num--;
}
-1
View File
@@ -9,7 +9,6 @@
#define IBLOCK_VERSION "4.0"
#define IBLOCK_MAX_CDBS 16
#define IBLOCK_LBA_SHIFT 9
struct iblock_req {
refcount_t pending;