Skip to content

Commit 5f2578e

Browse files
fujitajejb
authored andcommitted
[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>
1 parent 1978910 commit 5f2578e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/scsi/scsi_debug.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,7 @@ static void __init init_all_queued(void)
19491949
}
19501950

19511951
static void __init sdebug_build_parts(unsigned char *ramp,
1952-
unsigned int store_size)
1952+
unsigned long store_size)
19531953
{
19541954
struct partition * pp;
19551955
int starts[SDEBUG_MAX_PARTS + 2];
@@ -2476,14 +2476,14 @@ static void do_remove_driverfs_files(void)
24762476

24772477
static int __init scsi_debug_init(void)
24782478
{
2479-
unsigned int sz;
2479+
unsigned long sz;
24802480
int host_to_add;
24812481
int k;
24822482
int ret;
24832483

24842484
if (scsi_debug_dev_size_mb < 1)
24852485
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;
24872487
sdebug_store_sectors = sz / SECT_SIZE;
24882488
sdebug_capacity = get_sdebug_capacity();
24892489

0 commit comments

Comments
 (0)