Message ID | 150774466038.55191.18214496952092405741.stgit@djiang5-desk3.ch.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Oct 11, 2017 at 10:57 AM, Dave Jiang <dave.jiang@intel.com> wrote: > NVDIMM DSM interface v1.6 added additional smart health fields. Updating the > smart payload data structure accordingly. I'll also add a note when I merge this that the only reason we are maintaining this structure in the kernel is in case we want to translate 3rd party SMART payload formats into the ND_IOCTL_SMART format. Outside of that we could just delete this since ndctl is already doing that translation.
On Wed, Oct 11, 2017 at 11:01:26AM -0700, Dan Williams wrote: > On Wed, Oct 11, 2017 at 10:57 AM, Dave Jiang <dave.jiang@intel.com> wrote: > > NVDIMM DSM interface v1.6 added additional smart health fields. Updating the > > smart payload data structure accordingly. > > I'll also add a note when I merge this that the only reason we are > maintaining this structure in the kernel is in case we want to > translate 3rd party SMART payload formats into the ND_IOCTL_SMART > format. Outside of that we could just delete this since ndctl is > already doing that translation. Dan, Function 2, Get Smart Threshold, in v1.6 is also different from what Linux implemented in ndctl.h. But, these changes don't appear to be backward compatible. Do you have plans for this? Jerry
On Wed, Oct 11, 2017 at 10:57 AM, Dave Jiang <dave.jiang@intel.com> wrote: > NVDIMM DSM interface v1.6 added additional smart health fields. Updating the > smart payload data structure accordingly. I've thought about this a bit more and given the fact that this is out of date and the SMART threshold payload has changed in an incompatible manner in the latest spec, I'm going to deprecate these payloads. The threshold breakage is unfortunate but given the thresholds can not be set until support for the new 'set threshold' dsm the impact is limited. We'll leave these payloads in the kernel until there are no versions of ndctl shipping in distributions that depend on them.
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index 3f03567..5ca8628 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h @@ -25,6 +25,7 @@ struct nd_cmd_smart { #define ND_SMART_USED_VALID (1 << 2) #define ND_SMART_TEMP_VALID (1 << 3) #define ND_SMART_CTEMP_VALID (1 << 4) +#define ND_SMART_SHUTDOWN_COUNT_VALID (1 << 5) #define ND_SMART_ALARM_VALID (1 << 9) #define ND_SMART_SHUTDOWN_VALID (1 << 10) #define ND_SMART_VENDOR_VALID (1 << 11) @@ -44,7 +45,10 @@ struct nd_smart_payload { __u8 alarm_flags; __u16 temperature; __u16 ctrl_temperature; - __u8 reserved1[15]; + __u32 shutdown_count; + __u8 ait_status; + __u16 pmic_temperature; + __u8 reserved1[8]; __u8 shutdown_state; __u32 vendor_size; __u8 vendor_data[92];
NVDIMM DSM interface v1.6 added additional smart health fields. Updating the smart payload data structure accordingly. Signed-off-by: Dave Jiang <dave.jiang@intel.com> --- include/uapi/linux/ndctl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)