From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH] nvme-cli: add default value for nsid of write-zeroes
Date: Sat, 1 Jun 2019 16:00:03 +0900 [thread overview]
Message-ID: <20190601070003.20142-1-minwoo.im.dev@gmail.com> (raw)
-L 3772,3778 is doing the default value check and update the nsid if
it's not given by the input:
if (!cfg.namespace_id) {
cfg.namespace_id = get_nsid(fd);
if (cfg.namespace_id == 0) {
err = EINVAL;
goto close_fd;
}
}
This patch adds nsid default value to zero for the case user does not
give the nsid input.
Cc: Keith Busch <kbusch at kernel.org>
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
nvme.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/nvme.c b/nvme.c
index 9819fcb..a7a96a1 100644
--- a/nvme.c
+++ b/nvme.c
@@ -3731,6 +3731,7 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi
struct config cfg = {
.start_block = 0,
+ .namespace_id = 0,
.block_count = 0,
.prinfo = 0,
.ref_tag = 0,
--
2.21.0
next reply other threads:[~2019-06-01 7:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-01 7:00 Minwoo Im [this message]
2019-06-02 7:11 ` [PATCH] nvme-cli: add default value for nsid of write-zeroes Sagi Grimberg
2019-06-02 23:22 ` Chaitanya Kulkarni
2019-06-03 4:29 ` Minwoo Im
2019-06-03 4:27 ` Minwoo Im
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=20190601070003.20142-1-minwoo.im.dev@gmail.com \
--to=minwoo.im.dev@gmail.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