test/cuse: use 512B block size on namespace revert
Use 512B block size when running nvme_namespace_revert routine. Need to use this block size because of vhost_boot.sh test case. Fixes #1452 Change-Id: I5f41cf2bf9d63b811849a99de6cba9b7b5a1d97d Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3003 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
c10c9bf767
commit
8e8864f27e
@ -1232,7 +1232,9 @@ function nvme_namespace_revert() {
|
|||||||
|
|
||||||
if [[ "$oacs_ns_manage" -ne 0 ]]; then
|
if [[ "$oacs_ns_manage" -ne 0 ]]; then
|
||||||
# This assumes every NVMe controller contains single namespace,
|
# This assumes every NVMe controller contains single namespace,
|
||||||
# encompassing Total NVM Capacity and formatted as 4k block size.
|
# encompassing Total NVM Capacity and formatted as 512 block size.
|
||||||
|
# 512 block size is needed for test/vhost/vhost_boot.sh to
|
||||||
|
# succesfully run.
|
||||||
|
|
||||||
unvmcap=$(nvme id-ctrl ${nvme_ctrlr} | grep unvmcap | cut -d: -f2)
|
unvmcap=$(nvme id-ctrl ${nvme_ctrlr} | grep unvmcap | cut -d: -f2)
|
||||||
if [[ "$unvmcap" -eq 0 ]]; then
|
if [[ "$unvmcap" -eq 0 ]]; then
|
||||||
@ -1240,7 +1242,7 @@ function nvme_namespace_revert() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
tnvmcap=$(nvme id-ctrl ${nvme_ctrlr} | grep tnvmcap | cut -d: -f2)
|
tnvmcap=$(nvme id-ctrl ${nvme_ctrlr} | grep tnvmcap | cut -d: -f2)
|
||||||
blksize=4096
|
blksize=512
|
||||||
|
|
||||||
size=$((tnvmcap / blksize))
|
size=$((tnvmcap / blksize))
|
||||||
|
|
||||||
|
@ -56,10 +56,12 @@ function clean_up() {
|
|||||||
$rootdir/scripts/setup.sh reset
|
$rootdir/scripts/setup.sh reset
|
||||||
|
|
||||||
# This assumes every NVMe controller contains single namespace,
|
# This assumes every NVMe controller contains single namespace,
|
||||||
# encompassing Total NVM Capacity and formatted as 4k block size.
|
# encompassing Total NVM Capacity and formatted as 512 block size.
|
||||||
|
# 512 block size is needed for test/vhost/vhost_boot.sh to
|
||||||
|
# succesfully run.
|
||||||
|
|
||||||
tnvmcap=$($NVME_CMD id-ctrl ${nvme_dev} | grep tnvmcap | cut -d: -f2)
|
tnvmcap=$($NVME_CMD id-ctrl ${nvme_dev} | grep tnvmcap | cut -d: -f2)
|
||||||
blksize=4096
|
blksize=512
|
||||||
|
|
||||||
size=$((tnvmcap / blksize))
|
size=$((tnvmcap / blksize))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user