diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-03-29 11:59:57 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:19:07 -0400 |
commit | 5f2578e579ab74b4e3cfd1431bfa976e906594f6 (patch) | |
tree | d9e06bba427d05c6a0ac5224f97765a37ca60b3f /drivers/scsi/scsi_debug.c | |
parent | 1978910062c38394570c48b3065f37060be31b91 (diff) |
[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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index c98559eceade..1b6a6d8e5d27 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -1949,7 +1949,7 @@ static void __init init_all_queued(void) | |||
1949 | } | 1949 | } |
1950 | 1950 | ||
1951 | static void __init sdebug_build_parts(unsigned char *ramp, | 1951 | static void __init sdebug_build_parts(unsigned char *ramp, |
1952 | unsigned int store_size) | 1952 | unsigned long store_size) |
1953 | { | 1953 | { |
1954 | struct partition * pp; | 1954 | struct partition * pp; |
1955 | int starts[SDEBUG_MAX_PARTS + 2]; | 1955 | int starts[SDEBUG_MAX_PARTS + 2]; |
@@ -2476,14 +2476,14 @@ static void do_remove_driverfs_files(void) | |||
2476 | 2476 | ||
2477 | static int __init scsi_debug_init(void) | 2477 | static int __init scsi_debug_init(void) |
2478 | { | 2478 | { |
2479 | unsigned int sz; | 2479 | unsigned long sz; |
2480 | int host_to_add; | 2480 | int host_to_add; |
2481 | int k; | 2481 | int k; |
2482 | int ret; | 2482 | int ret; |
2483 | 2483 | ||
2484 | if (scsi_debug_dev_size_mb < 1) | 2484 | if (scsi_debug_dev_size_mb < 1) |
2485 | scsi_debug_dev_size_mb = 1; /* force minimum 1 MB ramdisk */ | 2485 | scsi_debug_dev_size_mb = 1; /* force minimum 1 MB ramdisk */ |
2486 | sz = (unsigned int)scsi_debug_dev_size_mb * 1048576; | 2486 | sz = (unsigned long)scsi_debug_dev_size_mb * 1048576; |
2487 | sdebug_store_sectors = sz / SECT_SIZE; | 2487 | sdebug_store_sectors = sz / SECT_SIZE; |
2488 | sdebug_capacity = get_sdebug_capacity(); | 2488 | sdebug_capacity = get_sdebug_capacity(); |
2489 | 2489 | ||