[PATCH 3/5 blktests] nvme: allow target subsys set model

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

 



This patch updates helper function create_nvmet_subsystem() to handle
newly introduced model attribute.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
 tests/nvme/rc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/nvme/rc b/tests/nvme/rc
index d1fa796..377c7f7 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -123,6 +123,7 @@ _create_nvmet_subsystem() {
 	local uuid=$3
 	local cntlid_min=$4
 	local cntlid_max=$5
+	local model=$6
 	local cfs_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
 
 	mkdir -p "${cfs_path}"
@@ -133,6 +134,9 @@ _create_nvmet_subsystem() {
 		echo ${cntlid_min} > ${cfs_path}/attr_cntlid_min
 		echo ${cntlid_max} > ${cfs_path}/attr_cntlid_max
 	fi
+	if [ $# -eq 6 ] && [ -f ${cfs_path}/attr_model ]; then
+		echo ${model} > ${cfs_path}/attr_model
+	fi
 }
 
 _remove_nvmet_ns() {
-- 
2.22.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux