From: Guixin Liu <kanie@linux.alibaba.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: shinichiro.kawasaki@wdc.com, chaitanyak@nvidia.com,
linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH blktests v4 2/2] nvme: test the nvme reservation feature
Date: Tue, 15 Oct 2024 09:19:17 +0800 [thread overview]
Message-ID: <9a14bfe8-320b-468c-aba1-4c57e35fb3da@linux.alibaba.com> (raw)
In-Reply-To: <a34131bd-3ff8-4531-9131-1dc35843fb36@flourine.local>
在 2024/10/14 19:44, Daniel Wagner 写道:
> On Mon, Oct 14, 2024 at 05:01:16PM GMT, Guixin Liu wrote:
>> +resv_report() {
>> + local test_dev=$1
>> + local report_arg=$2
>> +
>> + nvme resv-report "${test_dev}" "${report_arg}" | grep -v "hostid" | \
>> + grep -E "gen|rtype|regctl|regctlext|cntlid|rcsts|rkey"
> okay, let's see how this goes.
>
>> +test_resv() {
>> + local nvmedev=$1
>> + local report_arg="--cdw11=1"
>> + test_dev="/dev/${nvmedev}n1"
> Please use the namespace lookup helper and don't hardcode the namespace
> id.
>
OK, changed in v5, thanks.
Best Regards,
Guixin Liu
>> +
>> + if nvme resv-report --help 2>&1 | grep -- '--eds' > /dev/null; then
>> + report_arg="--eds"
>> + fi
>> +
>> + echo "Register"
>> + resv_report "${test_dev}" "${report_arg}"
>> + nvme resv-register "${test_dev}" --nrkey=4 --rrega=0
>> + resv_report "${test_dev}" "${report_arg}"
>> +
>> + echo "Replace"
>> + nvme resv-register "${test_dev}" --crkey=4 --nrkey=5 --rrega=2
>> + resv_report "${test_dev}" "${report_arg}"
>> +
>> + echo "Unregister"
>> + nvme resv-register "${test_dev}" --crkey=5 --rrega=1
>> + resv_report "${test_dev}" "${report_arg}"
>> +
>> + echo "Acquire"
>> + nvme resv-register "${test_dev}" --nrkey=4 --rrega=0
>> + nvme resv-acquire "${test_dev}" --crkey=4 --rtype=1 --racqa=0
>> + resv_report "${test_dev}" "${report_arg}"
>> +
>> + echo "Preempt"
>> + nvme resv-acquire "${test_dev}" --crkey=4 --rtype=2 --racqa=1
>> + resv_report "${test_dev}" "${report_arg}"
>> +
>> + echo "Release"
>> + nvme resv-release "${test_dev}" --crkey=4 --rtype=2 --rrela=0
>> + resv_report "${test_dev}" "${report_arg}"
>> +
>> + echo "Clear"
>> + nvme resv-register "${test_dev}" --nrkey=4 --rrega=0
>> + nvme resv-acquire "${test_dev}" --crkey=4 --rtype=1 --racqa=0
>> + resv_report "${test_dev}" "${report_arg}"
>> + nvme resv-release "${test_dev}" --crkey=4 --rrela=1
>> +}
>> +
>> +test() {
>> + echo "Running ${TEST_NAME}"
>> +
>> + _setup_nvmet
>> +
>> + local nvmedev
>> + local skipped=false
>> + local subsys_path=""
>> + local ns_path=""
>> +
>> + _nvmet_target_setup --blkdev file --resv_enable
>> + subsys_path="${NVMET_CFS}/subsystems/${def_subsysnqn}"
>> + ns_path="${subsys_path}/namespaces/1"
> Again here, it's better not to hardcode the nsid.
prev parent reply other threads:[~2024-10-15 1:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 9:01 [PATCH blktests v4 0/2] Test the NVMe reservation feature Guixin Liu
2024-10-14 9:01 ` [PATCH blktests v4 1/2] nvme/{md/001,rc,002,016,017,030,052}: introduce --resv_enable argument Guixin Liu
2024-10-14 9:01 ` [PATCH blktests v4 2/2] nvme: test the nvme reservation feature Guixin Liu
2024-10-14 11:44 ` Daniel Wagner
2024-10-15 1:19 ` Guixin Liu [this message]
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=9a14bfe8-320b-468c-aba1-4c57e35fb3da@linux.alibaba.com \
--to=kanie@linux.alibaba.com \
--cc=chaitanyak@nvidia.com \
--cc=dwagner@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=shinichiro.kawasaki@wdc.com \
/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