diff options
author | Hannes Reinecke <hare@suse.de> | 2014-06-25 09:27:36 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 16:07:37 -0400 |
commit | 9cb78c16f5dadefd8dc5ba0ae5a2f26cd59419b3 (patch) | |
tree | 576b86c3ec56dd7176285ec2d27f27ca55f77bc3 /drivers/scsi/scsi_debug.c | |
parent | 755f516bbb983915d6cbfb5aa592cc0a5a99fd00 (diff) |
scsi: use 64-bit LUNs
The SCSI standard defines 64-bit values for LUNs, and large arrays
employing large or hierarchical LUN numbers become more and more
common.
So update the linux SCSI stack to use 64-bit LUN numbers.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index c4ad52c2ec69..6ed43fd19a22 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -228,9 +228,9 @@ struct sdebug_dev_info { | |||
228 | unsigned char sense_buff[SDEBUG_SENSE_LEN]; /* weak nexus */ | 228 | unsigned char sense_buff[SDEBUG_SENSE_LEN]; /* weak nexus */ |
229 | unsigned int channel; | 229 | unsigned int channel; |
230 | unsigned int target; | 230 | unsigned int target; |
231 | unsigned int lun; | 231 | u64 lun; |
232 | struct sdebug_host_info *sdbg_host; | 232 | struct sdebug_host_info *sdbg_host; |
233 | unsigned int wlun; | 233 | u64 wlun; |
234 | char reset; | 234 | char reset; |
235 | char stopped; | 235 | char stopped; |
236 | char used; | 236 | char used; |
@@ -2278,7 +2278,8 @@ static int resp_report_luns(struct scsi_cmnd * scp, | |||
2278 | struct sdebug_dev_info * devip) | 2278 | struct sdebug_dev_info * devip) |
2279 | { | 2279 | { |
2280 | unsigned int alloc_len; | 2280 | unsigned int alloc_len; |
2281 | int lun_cnt, i, upper, num, n, wlun, lun; | 2281 | int lun_cnt, i, upper, num, n; |
2282 | u64 wlun, lun; | ||
2282 | unsigned char *cmd = (unsigned char *)scp->cmnd; | 2283 | unsigned char *cmd = (unsigned char *)scp->cmnd; |
2283 | int select_report = (int)cmd[2]; | 2284 | int select_report = (int)cmd[2]; |
2284 | struct scsi_lun *one_lun; | 2285 | struct scsi_lun *one_lun; |
@@ -2462,7 +2463,7 @@ static struct sdebug_dev_info * devInfoReg(struct scsi_device * sdev) | |||
2462 | static int scsi_debug_slave_alloc(struct scsi_device *sdp) | 2463 | static int scsi_debug_slave_alloc(struct scsi_device *sdp) |
2463 | { | 2464 | { |
2464 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) | 2465 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) |
2465 | printk(KERN_INFO "scsi_debug: slave_alloc <%u %u %u %u>\n", | 2466 | printk(KERN_INFO "scsi_debug: slave_alloc <%u %u %u %llu>\n", |
2466 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); | 2467 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); |
2467 | queue_flag_set_unlocked(QUEUE_FLAG_BIDI, sdp->request_queue); | 2468 | queue_flag_set_unlocked(QUEUE_FLAG_BIDI, sdp->request_queue); |
2468 | return 0; | 2469 | return 0; |
@@ -2473,7 +2474,7 @@ static int scsi_debug_slave_configure(struct scsi_device *sdp) | |||
2473 | struct sdebug_dev_info *devip; | 2474 | struct sdebug_dev_info *devip; |
2474 | 2475 | ||
2475 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) | 2476 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) |
2476 | printk(KERN_INFO "scsi_debug: slave_configure <%u %u %u %u>\n", | 2477 | printk(KERN_INFO "scsi_debug: slave_configure <%u %u %u %llu>\n", |
2477 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); | 2478 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); |
2478 | if (sdp->host->max_cmd_len != SCSI_DEBUG_MAX_CMD_LEN) | 2479 | if (sdp->host->max_cmd_len != SCSI_DEBUG_MAX_CMD_LEN) |
2479 | sdp->host->max_cmd_len = SCSI_DEBUG_MAX_CMD_LEN; | 2480 | sdp->host->max_cmd_len = SCSI_DEBUG_MAX_CMD_LEN; |
@@ -2496,7 +2497,7 @@ static void scsi_debug_slave_destroy(struct scsi_device *sdp) | |||
2496 | (struct sdebug_dev_info *)sdp->hostdata; | 2497 | (struct sdebug_dev_info *)sdp->hostdata; |
2497 | 2498 | ||
2498 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) | 2499 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) |
2499 | printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %u>\n", | 2500 | printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %llu>\n", |
2500 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); | 2501 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); |
2501 | if (devip) { | 2502 | if (devip) { |
2502 | /* make this slot available for re-use */ | 2503 | /* make this slot available for re-use */ |
@@ -2708,7 +2709,7 @@ static int schedule_resp(struct scsi_cmnd * cmnd, | |||
2708 | if (scsi_result) { | 2709 | if (scsi_result) { |
2709 | struct scsi_device * sdp = cmnd->device; | 2710 | struct scsi_device * sdp = cmnd->device; |
2710 | 2711 | ||
2711 | printk(KERN_INFO "scsi_debug: <%u %u %u %u> " | 2712 | printk(KERN_INFO "scsi_debug: <%u %u %u %llu> " |
2712 | "non-zero result=0x%x\n", sdp->host->host_no, | 2713 | "non-zero result=0x%x\n", sdp->host->host_no, |
2713 | sdp->channel, sdp->id, sdp->lun, scsi_result); | 2714 | sdp->channel, sdp->id, sdp->lun, scsi_result); |
2714 | } | 2715 | } |