All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-cli: add default value for nsid of write-zeroes
@ 2019-06-01  7:00 Minwoo Im
  2019-06-02  7:11 ` Sagi Grimberg
  0 siblings, 1 reply; 5+ messages in thread
From: Minwoo Im @ 2019-06-01  7:00 UTC (permalink / 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-03  4:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-01  7:00 [PATCH] nvme-cli: add default value for nsid of write-zeroes Minwoo Im
2019-06-02  7:11 ` Sagi Grimberg
2019-06-02 23:22   ` Chaitanya Kulkarni
2019-06-03  4:29     ` Minwoo Im
2019-06-03  4:27   ` Minwoo Im

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.