From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [blktests PATCH 1/2] nvme: handle model attr in subsys create helper
Date: Wed, 30 Oct 2019 12:52:57 -0700 [thread overview]
Message-ID: <20191030195258.31108-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20191030195258.31108-1-chaitanya.kulkarni@wdc.com>
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
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2019-10-30 19:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 19:52 [blktests PATCH 0/2] nvme: add a new test to check model attr Chaitanya Kulkarni
2019-10-30 19:52 ` Chaitanya Kulkarni [this message]
2019-11-01 7:42 ` [blktests PATCH 1/2] nvme: handle model attr in subsys create helper Chaitanya Kulkarni
2019-10-30 19:52 ` [blktests PATCH 2/2] nvme: add new test to check model attribute Chaitanya Kulkarni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191030195258.31108-2-chaitanya.kulkarni@wdc.com \
--to=chaitanya.kulkarni@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).