scsi: scsi_debug: Make sdebug_build_parts() respect virtual_gb
authorJohn Pittman <jpittman@redhat.com>
Wed, 2 Sep 2020 21:14:34 +0000 (17:14 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 3 Sep 2020 02:49:54 +0000 (22:49 -0400)
commit8c6572356646f700e1679d8f7eb2ab3a4eab678c
tree251a04d81c0b23c915b9b45a486522fec355bd36
parent979e0dc3457cc95e48920ff5ca901a5821ef57d8
scsi: scsi_debug: Make sdebug_build_parts() respect virtual_gb

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.

Link: https://lore.kernel.org/r/20200902211434.9979-3-jpittman@redhat.com
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: John Pittman <jpittman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c