nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Vishal L Verma <vishal.l.verma@intel.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>
Subject: Re: [ndctl PATCH 1/3] ndctl: Introduce dirty-dimm command
Date: Tue, 18 Sep 2018 12:49:53 -0700	[thread overview]
Message-ID: <CAPcyv4hGEewBk=TSO6ey50u1uoguoD7BVD96qCw+0d+hKkdHYA@mail.gmail.com> (raw)
In-Reply-To: <1537298146.5995.239.camel@intel.com>

On Tue, Sep 18, 2018 at 12:15 PM Verma, Vishal L
<vishal.l.verma@intel.com> 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 <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?

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
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-09-18 19:50 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
2018-09-18 19:49     ` Dan Williams [this message]
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='CAPcyv4hGEewBk=TSO6ey50u1uoguoD7BVD96qCw+0d+hKkdHYA@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=vishal.l.verma@intel.com \
    --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).