[SCSI] scsi_debug: fix virtual disk larger than 1TB

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, June 12, 2009 - 11:01 am

Gitweb:     http://git.kernel.org/linus/73da9c13d4df3c1715029aa45edc78d71b617dfd
Commit:     73da9c13d4df3c1715029aa45edc78d71b617dfd
Parent:     f381642d8f8963e62f5d45774505fd936f2b6072
Author:     FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
AuthorDate: Wed Apr 22 17:42:25 2009 -0700
Committer:  James Bottomley <James.Bottomley@HansenPartnership.com>
CommitDate: Wed May 20 17:21:15 2009 -0500

    [SCSI] scsi_debug: fix virtual disk larger than 1TB
    
    Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
    Acked-by: Douglas Gilbert <dgilbert@interlog.com>
    Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 drivers/scsi/scsi_debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 213123b..41a2177 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -887,7 +887,7 @@ static int resp_start_stop(struct scsi_cmnd * scp,
 static sector_t get_sdebug_capacity(void)
 {
 	if (scsi_debug_virtual_gb > 0)
-		return 2048 * 1024 * scsi_debug_virtual_gb;
+		return 2048 * 1024 * (sector_t)scsi_debug_virtual_gb;
 	else
 		return sdebug_store_sectors;
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[SCSI] scsi_debug: fix virtual disk larger than 1TB, Linux Kernel Mailing ..., (Fri Jun 12, 11:01 am)