Re: [PATCH v2 2/2] scsi: scsi_debug: sdebug_build_parts() respect virtual_gb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-09-02 5:14 p.m., John Pittman wrote:
If virtual_gb is passed while using num_parts, when creating the
partitions, virtual_gb is not respected.  Set num_sectors using
get_sdebug_capacity() to pull virtual_gb if set.


Acked-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>

Signed-off-by: John Pittman <jpittman@xxxxxxxxxx>
---
  drivers/scsi/scsi_debug.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index ada0361eac83..a36652d41314 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -5268,7 +5268,7 @@ static void sdebug_build_parts(unsigned char *ramp, unsigned long store_size)
  		sdebug_num_parts = SDEBUG_MAX_PARTS;
  		pr_warn("reducing partitions to %d\n", SDEBUG_MAX_PARTS);
  	}
-	num_sectors = (int)sdebug_store_sectors;
+	num_sectors = (int)get_sdebug_capacity();
  	sectors_per_part = (num_sectors - sdebug_sectors_per)
  			   / sdebug_num_parts;
  	heads_by_sects = sdebug_heads * sdebug_sectors_per;





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux