Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
80b045b3 5e568d22

+2 -3
+2 -2
drivers/target/target_core_iblock.c
··· 514 514 } 515 515 516 516 /* Always in 512 byte units for Linux/Block */ 517 - block_lba += sg->length >> IBLOCK_LBA_SHIFT; 517 + block_lba += sg->length >> SECTOR_SHIFT; 518 518 sectors -= 1; 519 519 } 520 520 ··· 777 777 } 778 778 779 779 /* Always in 512 byte units for Linux/Block */ 780 - block_lba += sg->length >> IBLOCK_LBA_SHIFT; 780 + block_lba += sg->length >> SECTOR_SHIFT; 781 781 sg_num--; 782 782 } 783 783
-1
drivers/target/target_core_iblock.h
··· 9 9 #define IBLOCK_VERSION "4.0" 10 10 11 11 #define IBLOCK_MAX_CDBS 16 12 - #define IBLOCK_LBA_SHIFT 9 13 12 14 13 struct iblock_req { 15 14 refcount_t pending;