From: "Verma, Vishal L" <vishal.l.verma@intel.com> To: "Williams, Dan J" <dan.j.williams@intel.com>, "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org> Subject: Re: [ndctl PATCH 1/3] ndctl: Introduce dirty-dimm command Date: Tue, 18 Sep 2018 19:15:48 +0000 [thread overview] Message-ID: <1537298146.5995.239.camel@intel.com> (raw) In-Reply-To: <153724975617.55312.7253687867673718680.stgit@dwillia2-desk3.amr.corp.intel.com> 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 <keith.busch@intel.com> > Cc: Vishal Verma <vishal.l.verma@intel.com> > Signed-off-by: Dan Williams <dan.j.williams@intel.com> > --- > 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? > + ndctl_cmd_unref(cmd); > + > + return 0; ^ stray whitespace? > +} _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2018-09-18 19:15 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-09-18 5:49 [ndctl PATCH 0/3] ndctl: Remove udev rule for latch and dirty-shutdown-count Dan Williams 2018-09-18 5:49 ` [ndctl PATCH 1/3] ndctl: Introduce dirty-dimm command Dan Williams 2018-09-18 19:15 ` Verma, Vishal L [this message] 2018-09-18 19:49 ` Dan Williams 2018-09-18 5:49 ` [ndctl PATCH 2/3] ndctl: Revert "ndctl, intel: Fallback to smart cached shutdown_count" Dan Williams 2018-09-18 5:49 ` [ndctl PATCH 3/3] ndctl: Revert "ndctl: Create ndctl udev rules for dirty shutdown" Dan Williams
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=1537298146.5995.239.camel@intel.com \ --to=vishal.l.verma@intel.com \ --cc=dan.j.williams@intel.com \ --cc=linux-nvdimm@lists.01.org \ --subject='Re: [ndctl PATCH 1/3] ndctl: Introduce dirty-dimm command' \ /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
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).