From: paul.grabinar@ranbarg.com (Paul Grabinar)
Subject: nvme-cli format timeout
Date: Thu, 23 Jul 2015 21:03:37 +0100 [thread overview]
Message-ID: <55B14899.5000407@ranbarg.com> (raw)
Hi,
I am aware of some NVMe drives that take well over 60 seconds to perform
a format and therefore timeout during the format command issued by nvme-cli.
We might want to consider increasing the timeout. The following patch is
an example to show what I mean.
Thanks.
diff --git a/nvme.c b/nvme.c
index 02f4dec..5c99dea 100644
--- a/nvme.c
+++ b/nvme.c
@@ -51,6 +51,8 @@
#define min(x, y) (x) > (y) ? (y) : (x)
+#define FORMAT_TIMEOUT 120000 // 120 seconds
+
static int fd;
static struct stat nvme_stat;
static const char *devicename;
@@ -2132,6 +2134,7 @@ static int format(int argc, char **argv)
cmd.opcode = nvme_admin_format_nvm;
cmd.nsid = cfg.namespace_id;
cmd.cdw10 = (cfg.lbaf << 0) | (cfg.ms << 4) | (cfg.pi << 5) | (cfg.pil << 8) | (cfg.ses << 9);
+ cmd.timeout_ms = FORMAT_TIMEOUT;
err = ioctl(fd, NVME_IOCTL_ADMIN_CMD, &cmd);
if (err < 0)
next reply other threads:[~2015-07-23 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 20:03 Paul Grabinar [this message]
2015-07-23 20:11 ` nvme-cli format timeout Keith Busch
2015-07-23 20:22 ` Paul Grabinar
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=55B14899.5000407@ranbarg.com \
--to=paul.grabinar@ranbarg.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