On Tue, Sep 18, 2018 at 12:15 PM Verma, Vishal L <[email protected]> wrote: > > > On Mon, 2018-09-17 at 22:49 -0700, Dan Williams wrote: > > Some DIMMs provide a facility to track dirty-shutdown events. The > > counter only rolls forward after the OS sets a latch. This allows the > > agent tracking dirty shutdowns to ignore events that occur while the > > capacity has not been written. For these DIMMs dirty-dimm will trigger > > the counter to roll to the next state. The shutdown state can be > > retrieved with 'ndctl list -DH' > > > > Cc: Keith Busch <[email protected]> > > Cc: Vishal Verma <[email protected]> > > Signed-off-by: Dan Williams <[email protected]> > > --- > > Documentation/ndctl/Makefile.am | 1 + > > Documentation/ndctl/ndctl-dirty-dimm.txt | 29 > > +++++++++++++++++++++++++++++ > > builtin.h | 1 + > > ndctl/dimm.c | 28 > > ++++++++++++++++++++++++++++ > > ndctl/ndctl.c | 1 + > > 5 files changed, 60 insertions(+) > > create mode 100644 Documentation/ndctl/ndctl-dirty-dimm.txt > > The series generally looks good to me, just a couple comments below: > > > > > diff --git a/ndctl/dimm.c b/ndctl/dimm.c > > index a4203f354000..595e4e4096a5 100644 > > --- a/ndctl/dimm.c > > +++ b/ndctl/dimm.c > > @@ -61,6 +61,19 @@ static int action_zero(struct ndctl_dimm *dimm, struct > > action_context *actx) > > return ndctl_dimm_zero_labels(dimm); > > } > > > > +static int action_dirty(struct ndctl_dimm *dimm, struct action_context > > *actx) > > +{ > > + struct ndctl_cmd *cmd; > > + > > + cmd = ndctl_dimm_cmd_new_ack_shutdown_count(dimm); > > + if (!cmd) > > + return -EOPNOTSUPP; > > + ndctl_cmd_submit(cmd); > > Shouldn't we report any errors here?
Yeah, I expect failure here is likely to be common, so we shouldn't be silent about it. > > + ndctl_cmd_unref(cmd); > > + > > + return 0; > > ^ stray whitespace? Yup, and now I also a few asciidoctor reported nits, will resend. _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
