.nf
\fInvme resv\-report\fR <device> [\-\-namespace\-id=<nsid> | \-n <nsid>]
[\-\-numd=<num\-dwords> | \-d <num\-dwords>]
- [\-\-cdw11=<cdw11> | \-c <cdw11>]
+ [\-\-eds | \-e]
[\-\-raw\-binary | \-b]
[\-\-output\-format=<fmt> | \-o <fmt>]
.fi
Specify the number of Dwords of the Reservation Status structure to transfer\&. Defaults to 4k\&.
.RE
.PP
-\-c <cdw11>, \-\-cdw11=<cdw11>
+\-e, \-\-eds
.RS 4
-The value for command dword 11\&. Setting bit 0 specifies that the controller returns the Extended Data Structure\&.
+Request extended Data Structure: If this bit is set to a
+\fI1\fR, then the controller returns the Extended Data Structure\&.
.RE
.PP
\-b, \-\-raw\-binary
<div class="verseblock">\r
<pre class="content"><em>nvme resv-report</em> <device> [--namespace-id=<nsid> | -n <nsid>]\r
[--numd=<num-dwords> | -d <num-dwords>]\r
- [--cdw11=<cdw11> | -c <cdw11>]\r
+ [--eds | -e]\r
[--raw-binary | -b]\r
[--output-format=<fmt> | -o <fmt>]</pre>\r
<div class="attribution">\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
--c <cdw11>\r
+-e\r
</dt>\r
<dt class="hdlist1">\r
---cdw11=<cdw11>\r
+--eds\r
</dt>\r
<dd>\r
<p>\r
- The value for command dword 11. Setting bit 0 specifies that the\r
+ Request extended Data Structure: If this bit is set to a '1', then the\r
controller returns the Extended Data Structure.\r
</p>\r
</dd>\r
[verse]
'nvme resv-report' <device> [--namespace-id=<nsid> | -n <nsid>]
[--numd=<num-dwords> | -d <num-dwords>]
- [--cdw11=<cdw11> | -c <cdw11>]
+ [--eds | -e]
[--raw-binary | -b]
[--output-format=<fmt> | -o <fmt>]
Specify the number of Dwords of the Reservation Status structure
to transfer. Defaults to 4k.
--c <cdw11>::
---cdw11=<cdw11>::
- The value for command dword 11. Setting bit 0 specifies that the
+-e::
+--eds::
+ Request extended Data Structure: If this bit is set to a '1', then the
controller returns the Extended Data Structure.
-b::
-n':alias of --namespace-id'
--numd=':number of dwords of reservation status to xfer'
-d':alias of --numd'
+ --eds':request extended data structure'
+ -e':alias of --eds'
--raw-binary':dump output in binary format'
-b':alias of --raw-binary'
)
--rrela= -a --iekey -i"
;;
"resv-report")
- opts+=" --namespace-id= -n --numd= -d --raw-binary= -b \
- --output-format= -o"
+ opts+=" --namespace-id= -n --numd= -d --eds -e \
+ --raw-binary= -b --output-format= -o"
;;
"dsm")
opts+=" --namespace-id= -n --ctx-attrs= -a --blocks= -b\
}
static void json_nvme_resv_report(struct nvme_resv_status *status,
- int bytes, __u32 cdw11)
+ int bytes, bool eds)
{
struct json_object *root;
struct json_object *rcs;
rcs = json_create_array();
/* check Extended Data Structure bit */
- if ((cdw11 & 0x1) == 0) {
+ if (!eds) {
/*
* if status buffer was too small, don't loop past the end of
* the buffer
}
void nvme_show_resv_report(struct nvme_resv_status *status, int bytes,
- __u32 cdw11, enum nvme_print_flags flags)
+ bool eds, enum nvme_print_flags flags)
{
int i, j, regctl, entries;
if (flags & BINARY)
return d_raw((unsigned char *)status, bytes);
else if (flags & JSON)
- return json_nvme_resv_report(status, bytes, cdw11);
+ return json_nvme_resv_report(status, bytes, eds);
regctl = status->regctl[0] | (status->regctl[1] << 8);
printf("ptpls : %d\n", status->ptpls);
/* check Extended Data Structure bit */
- if ((cdw11 & 0x1) == 0) {
+ if (!eds) {
/*
* if status buffer was too small, don't loop past the end of
* the buffer
void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, unsigned int mode);
void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid,
enum nvme_print_flags flags);
-void nvme_show_resv_report(struct nvme_resv_status *status, int bytes, __u32 cdw11,
+void nvme_show_resv_report(struct nvme_resv_status *status, int bytes, bool eds,
enum nvme_print_flags flags);
void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges);
void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries,
"namespace.";
const char *namespace_id = "identifier of desired namespace";
const char *numd = "number of dwords to transfer";
- const char *cdw11 = "command dword 11 value";
+ const char *eds = "request extended data structure";
const char *raw = "dump output in binary format";
struct nvme_resv_status *status;
struct config {
__u32 namespace_id;
__u32 numd;
- __u32 cdw11;
+ __u8 eds;
int raw_binary;
char *output_format;
};
struct config cfg = {
.namespace_id = 0,
.numd = 0,
- .cdw11 = 0,
+ .eds = 0,
.output_format = "normal",
};
OPT_ARGS(opts) = {
OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_id),
OPT_UINT("numd", 'd', &cfg.numd, numd),
- OPT_UINT("cdw11", 'c', &cfg.cdw11, cdw11),
+ OPT_FLAG("eds", 'e', &cfg.eds, eds),
OPT_FMT("output-format", 'o', &cfg.output_format, output_format),
OPT_FLAG("raw-binary", 'b', &cfg.raw_binary, raw),
OPT_END()
}
memset(status, 0, size);
- err = nvme_resv_report(fd, cfg.namespace_id, cfg.cdw11, size, status);
+ err = nvme_resv_report(fd, cfg.namespace_id, cfg.eds, size, status);
if (!err)
- nvme_show_resv_report(status, size, cfg.cdw11, flags);
+ nvme_show_resv_report(status, size, cfg.eds, flags);
else if (err > 0)
nvme_show_status(err);
else