Commit ba52842d authored by Bart Van Assche's avatar Bart Van Assche Committed by Greg Kroah-Hartman

scsi: target/core: Use the SECTOR_SHIFT constant

[ Upstream commit 80b045b3 ]

Instead of duplicating the SECTOR_SHIFT definition from <linux/blkdev.h>,
use it. This patch does not change any functionality.
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 17111037
...@@ -514,7 +514,7 @@ iblock_execute_write_same(struct se_cmd *cmd) ...@@ -514,7 +514,7 @@ iblock_execute_write_same(struct se_cmd *cmd)
} }
/* Always in 512 byte units for Linux/Block */ /* Always in 512 byte units for Linux/Block */
block_lba += sg->length >> IBLOCK_LBA_SHIFT; block_lba += sg->length >> SECTOR_SHIFT;
sectors -= 1; sectors -= 1;
} }
...@@ -757,7 +757,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, ...@@ -757,7 +757,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
} }
/* Always in 512 byte units for Linux/Block */ /* Always in 512 byte units for Linux/Block */
block_lba += sg->length >> IBLOCK_LBA_SHIFT; block_lba += sg->length >> SECTOR_SHIFT;
sg_num--; sg_num--;
} }
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#define IBLOCK_VERSION "4.0" #define IBLOCK_VERSION "4.0"
#define IBLOCK_MAX_CDBS 16 #define IBLOCK_MAX_CDBS 16
#define IBLOCK_LBA_SHIFT 9
struct iblock_req { struct iblock_req {
refcount_t pending; refcount_t pending;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment