From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 4/4] move struct nvme_additional_smart_log to intel-nvme.c
Date: Mon, 13 Mar 2017 17:10:54 -0600 [thread overview]
Message-ID: <20170313231054.30400-5-hch@lst.de> (raw)
In-Reply-To: <20170313231054.30400-1-hch@lst.de>
It's a vendor-specific structure only used by the intel plugin, so
move it there.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
intel-nvme.c | 38 ++++++++++++++++++++++++++++++++++++++
nvme.h | 38 --------------------------------------
2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/intel-nvme.c b/intel-nvme.c
index 3446115..8ff506c 100644
--- a/intel-nvme.c
+++ b/intel-nvme.c
@@ -21,6 +21,44 @@
#define CREATE_CMD
#include "intel-nvme.h"
+#pragma pack(push,1)
+struct nvme_additional_smart_log_item {
+ __u8 key;
+ __u8 _kp[2];
+ __u8 norm;
+ __u8 _np;
+ union {
+ __u8 raw[6];
+ struct wear_level {
+ __le16 min;
+ __le16 max;
+ __le16 avg;
+ } wear_level ;
+ struct thermal_throttle {
+ __u8 pct;
+ __u32 count;
+ } thermal_throttle;
+ };
+ __u8 _rp;
+};
+#pragma pack(pop)
+
+struct nvme_additional_smart_log {
+ struct nvme_additional_smart_log_item program_fail_cnt;
+ struct nvme_additional_smart_log_item erase_fail_cnt;
+ struct nvme_additional_smart_log_item wear_leveling_cnt;
+ struct nvme_additional_smart_log_item e2e_err_cnt;
+ struct nvme_additional_smart_log_item crc_err_cnt;
+ struct nvme_additional_smart_log_item timed_workload_media_wear;
+ struct nvme_additional_smart_log_item timed_workload_host_reads;
+ struct nvme_additional_smart_log_item timed_workload_timer;
+ struct nvme_additional_smart_log_item thermal_throttle_status;
+ struct nvme_additional_smart_log_item retry_buffer_overflow_cnt;
+ struct nvme_additional_smart_log_item pll_lock_loss_cnt;
+ struct nvme_additional_smart_log_item nand_bytes_written;
+ struct nvme_additional_smart_log_item host_bytes_written;
+};
+
static void intel_id_ctrl(__u8 *vs, struct json_object *root)
{
char bl[9];
diff --git a/nvme.h b/nvme.h
index fb2a3a3..397a1a5 100644
--- a/nvme.h
+++ b/nvme.h
@@ -55,44 +55,6 @@ enum {
NVME_ID_CNS_CTRL_LIST = 0x13,
};
-#pragma pack(push,1)
-struct nvme_additional_smart_log_item {
- __u8 key;
- __u8 _kp[2];
- __u8 norm;
- __u8 _np;
- union {
- __u8 raw[6];
- struct wear_level {
- __le16 min;
- __le16 max;
- __le16 avg;
- } wear_level ;
- struct thermal_throttle {
- __u8 pct;
- __u32 count;
- } thermal_throttle;
- };
- __u8 _rp;
-};
-#pragma pack(pop)
-
-struct nvme_additional_smart_log {
- struct nvme_additional_smart_log_item program_fail_cnt;
- struct nvme_additional_smart_log_item erase_fail_cnt;
- struct nvme_additional_smart_log_item wear_leveling_cnt;
- struct nvme_additional_smart_log_item e2e_err_cnt;
- struct nvme_additional_smart_log_item crc_err_cnt;
- struct nvme_additional_smart_log_item timed_workload_media_wear;
- struct nvme_additional_smart_log_item timed_workload_host_reads;
- struct nvme_additional_smart_log_item timed_workload_timer;
- struct nvme_additional_smart_log_item thermal_throttle_status;
- struct nvme_additional_smart_log_item retry_buffer_overflow_cnt;
- struct nvme_additional_smart_log_item pll_lock_loss_cnt;
- struct nvme_additional_smart_log_item nand_bytes_written;
- struct nvme_additional_smart_log_item host_bytes_written;
-};
-
struct nvme_host_mem_buffer {
__u32 hsize;
__u32 hmdlal;
--
2.11.0
next prev parent reply other threads:[~2017-03-13 23:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 23:10 nvme-cli: finish the move of vendor specific commands to plugins Christoph Hellwig
2017-03-13 23:10 ` [PATCH 1/4] move show_intel_smart_log to intel-nvme.c Christoph Hellwig
2017-03-13 23:10 ` [PATCH 2/4] remove json_add_smart_log Christoph Hellwig
2017-03-13 23:10 ` [PATCH 3/4] remove nvme_intel_smart_log Christoph Hellwig
2017-03-13 23:10 ` Christoph Hellwig [this message]
2017-03-14 15:02 ` nvme-cli: finish the move of vendor specific commands to plugins Keith Busch
2017-03-19 22:46 ` Sagi Grimberg
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=20170313231054.30400-5-hch@lst.de \
--to=hch@lst.de \
/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;
as well as URLs for NNTP newsgroup(s).