Spdk/test/setup
Michal Berger 26c2f987f6 test/setup: Use hw_sector_size to convert size to sectors
The {logical,physical}_block_size may actually differ (physical can
be bigger than logical) so always use the smallest available unit -
the hw_sector_size is an actual alias to logical_block_size and it's
also clearly indicating what unit sgdisk is working with.

In case the physical_block_size differs, the resulted partitions may
have different size than expected. For instance, under nvme with
512/4096 layout, the partitions were ending up 128MB in size instead
of 1GB causing the dmsetup to fail (as it expects to join partitions
1GB in size each).

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ib6d3afd3471af2c2e9a5ced17004dd9c565708c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16551
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-17 10:16:35 +00:00
..
acl.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
common.sh test/setup: Use hw_sector_size to convert size to sectors 2023-02-17 10:16:35 +00:00
devices.sh test/setup: Add some overhead to min_disk_size 2023-02-17 10:16:35 +00:00
driver.sh scripts/setup: Stop checking for broken uio_pci_generic driver 2022-12-14 08:03:17 +00:00
hugepages.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
test-setup.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00