Linux-NVDIMM Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"dave.jiang@intel.com" <dave.jiang@intel.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH v6 2/3] ndctl: add list-errors support
Date: Fri, 5 May 2017 17:49:03 +0000	[thread overview]
Message-ID: <1494006538.30303.67.camel@hpe.com> (raw)
In-Reply-To: <1494005739.30303.65.camel@hpe.com>

On Fri, 2017-05-05 at 11:35 -0600, Toshi Kani wrote:
> On Fri, 2017-05-05 at 10:27 -0700, Dave Jiang wrote:
> > 
> > On 05/05/2017 10:21 AM, Kani, Toshimitsu wrote:
> > > On Fri, 2017-05-05 at 10:14 -0700, Dave Jiang wrote:
> > > > 
> > > > On 05/05/2017 10:07 AM, Kani, Toshimitsu wrote:
> > > > > On Thu, 2017-05-04 at 14:49 -0700, Dave Jiang wrote:
> > > > > > Adding list-errors command to support displaying of all
> > > > > > badblocks in relation to the device rather than the region.
> > > > > > This allows the user to know what badblocks to pass in when
> > > > > > doing clear-error calls.
> > > > > > 
> > > > > > Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> > > > > > ---
> > > > > >  Documentation/ndctl-list-errors.txt |   26 +++++++
> > > > > >  builtin.h                           |    1
> > > > > >  ndctl/clear-error.c                 |  133
> > > > > > ++++++++++++++++++++++++++++++++---
> > > > > >  ndctl/ndctl.c                       |    1
> > > > > >  4 files changed, 151 insertions(+), 10 deletions(-)
> > > > > >  create mode 100644 Documentation/ndctl-list-errors.txt
> > > > > > 
> > > > > > diff --git a/Documentation/ndctl-list-errors.txt
> > > > > > b/Documentation/ndctl-list-errors.txt
> > > > > > new file mode 100644
> > > > > > index 0000000..f831ba0
> > > > > > --- /dev/null
> > > > > > +++ b/Documentation/ndctl-list-errors.txt
> > > > > > @@ -0,0 +1,26 @@
> > > > > > +ndctl-list-errors(1)
> > > > > > +====================
> > > > > > +
> > > > > > +NAME
> > > > > > +----
> > > > > > +ndctl-list-errors - list badblocks specifically in
> > > > > > relation
> > > > > > to a
> > > > > > device
> > > > > > +
> > > > > > +SYNOPSIS
> > > > > > +--------
> > > > > > +[verse]
> > > > > > +'ndctl list-errors' [<options>]
> > > > > > +
> > > > > > +EXAMPLES
> > > > > > +--------
> > > > > > +
> > > > > > +List bad blocks for the provided device
> > > > > > +[verse]
> > > > > > +ndctl list-errors -f /dev/dax0.0
> > > > > > +
> > > > > > +List all badblocks for device /dev/dax0.0.
> > > > > 
> > > > > Hi Dave,
> > > > > 
> > > > > I am not getting sensible values from list-errors.  Also,
> > > > > please describe the output format of this command in the
> > > > > document.
> > > > > 
> > > > > # cat /sys/bus/nd/devices/region0/size
> > > > > 17179869184
> > > > > 
> > > > > # cat /sys/class/dax/dax0.0/size
> > > > > 16909336576
> > > > > 
> > > > > # cat /sys/bus/nd/devices/region0/badblocks
> > > > > 1048576 1
> > > > > 1572864 1
> > > > > 
> > > > > # ndctl list-errors -f /dev/dax0.0
> > > > > 0 3145729
> > > > > 0 3670017
> > > > 
> > > > That is very strange. It looks correct with nfit_test for me.
> > > > How do I reproduce your case or do I actually need actual
> > > > hardware?
> > > 
> > > Yes, my steps need a hardware, but this badblocks handling itself
> > > should be platform-independent.  I will check to see why I got
> > > these values.
> > 
> > Thanks! what is your region/resource and dax/resource?
> 
> See attached. Let me know if you need more info.

dax_begin and dax_end get -1 in print_dax_badblocks() because
ndctl_dax_get_resource() and ndctl_dax_get_size() failed.  I think this
is due to the numbering of sysfs dax files, which Dan an I talked about
yesterday.

Thanks,
-Toshi  


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2017-05-05 17:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 21:48 [PATCH v6 0/3] ndctl: add error clearing support for dev dax Dave Jiang
2017-05-04 21:49 ` [PATCH v6 1/3] ndctl: add clear-error to ndctl for device dax Dave Jiang
2017-05-05 19:14   ` Dan Williams
2017-05-05 19:33     ` Dan Williams
2017-05-05 19:41     ` Linda Knippers
2017-05-05 20:01       ` Dan Williams
2017-05-05 20:23         ` Linda Knippers
2017-05-04 21:49 ` [PATCH v6 2/3] ndctl: add list-errors support Dave Jiang
2017-05-05 17:07   ` Kani, Toshimitsu
2017-05-05 17:14     ` Dave Jiang
2017-05-05 17:21       ` Kani, Toshimitsu
2017-05-05 17:27         ` Dave Jiang
2017-05-05 17:35           ` Kani, Toshimitsu
2017-05-05 17:49             ` Kani, Toshimitsu [this message]
2017-05-04 21:49 ` [PATCH v6 3/3] ndctl: add test for clear-error Dave Jiang

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=1494006538.30303.67.camel@hpe.com \
    --to=toshi.kani@hpe.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /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