This patch allows _create_nvmet_subsystem to handle and optionally set model attribute for the subsys. --- tests/nvme/rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/nvme/rc b/tests/nvme/rc index 40f0413..2d11e2e 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -121,10 +121,14 @@ _create_nvmet_subsystem() { local nvmet_subsystem="$1" local blkdev="$2" local uuid=$3 + local model=$4 local cfs_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}" mkdir -p "${cfs_path}" echo 1 > "${cfs_path}/attr_allow_any_host" + if [ -f "${cfs_path}/attr_model" ] && [ ! -z ${model+x} ]; then + echo -n ${model} > "${cfs_path}/attr_model" + fi _create_nvmet_ns "${nvmet_subsystem}" "1" "${blkdev}" "${uuid}" } -- 2.22.1