Commit 5f2578e5 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley

[SCSI] scsi_debug: support large non-fake virtual disk

Currently, the maximum amount of RAM that scsi_debug can allocate is
4GB. This patch increases it to 2TB; scsi_debug can allocates 2TB
memory and export it as if it were 2TB scsi disk.
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: default avatarDouglas Gilbert <dougg@torque.net>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 19789100
...@@ -1949,7 +1949,7 @@ static void __init init_all_queued(void) ...@@ -1949,7 +1949,7 @@ static void __init init_all_queued(void)
} }
static void __init sdebug_build_parts(unsigned char *ramp, static void __init sdebug_build_parts(unsigned char *ramp,
unsigned int store_size) unsigned long store_size)
{ {
struct partition * pp; struct partition * pp;
int starts[SDEBUG_MAX_PARTS + 2]; int starts[SDEBUG_MAX_PARTS + 2];
...@@ -2476,14 +2476,14 @@ static void do_remove_driverfs_files(void) ...@@ -2476,14 +2476,14 @@ static void do_remove_driverfs_files(void)
static int __init scsi_debug_init(void) static int __init scsi_debug_init(void)
{ {
unsigned int sz; unsigned long sz;
int host_to_add; int host_to_add;
int k; int k;
int ret; int ret;
if (scsi_debug_dev_size_mb < 1) if (scsi_debug_dev_size_mb < 1)
scsi_debug_dev_size_mb = 1; /* force minimum 1 MB ramdisk */ scsi_debug_dev_size_mb = 1; /* force minimum 1 MB ramdisk */
sz = (unsigned int)scsi_debug_dev_size_mb * 1048576; sz = (unsigned long)scsi_debug_dev_size_mb * 1048576;
sdebug_store_sectors = sz / SECT_SIZE; sdebug_store_sectors = sz / SECT_SIZE;
sdebug_capacity = get_sdebug_capacity(); sdebug_capacity = get_sdebug_capacity();
......
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