[SCSI] scsi_debug: fix virtual disk larger than 1TB
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 23 Apr 2009 00:42:25 +0000 (17:42 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 20 May 2009 22:21:15 +0000 (17:21 -0500)
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

index 213123b..41a2177 100644 (file)
@@ -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;
 }