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 v2 2/2] ndctl: add list --media-errors support
Date: Wed, 10 May 2017 14:50:08 +0000 [thread overview]
Message-ID: <1494427797.30303.75.camel@hpe.com> (raw)
In-Reply-To: <149437264268.67960.7347964981686229026.stgit@djiang5-desk3.ch.intel.com>
On Tue, 2017-05-09 at 16:31 -0700, Dave Jiang wrote:
> Adding option for ndctl list command to show badblocks for region and
> device. The device badblocks are calculated from the region
> badblocks.
> This allows the user to provide the proper badblock offset and length
> for clearing later on.
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Hi Dave,
A badblock in metadata is shown as offset 0 with a negative length.
Perhaps, you may want to add more test cases.
# cat /sys/bus/nd/devices/region0/badblocks
2048 1
1048576 1
1572864 1
# ndctl list --media-errors --mode=dax
{
"dev":"namespace0.0",
"mode":"dax",
"size":16909336576,
"uuid":"8c71811f-260d-4788-8487-db88d829d393",
"badblocks":[
{
"offset":0,
"length":-526335
},
{
"offset":520192,
"length":1
},
{
"offset":1044480,
"length":1
}
]
}
Thanks,
-Toshi
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2017-05-10 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 23:30 [PATCH v2 1/2] ndctl: add foreach helper for region badblocks in libndctl Dave Jiang
2017-05-09 23:31 ` [PATCH v2 2/2] ndctl: add list --media-errors support Dave Jiang
2017-05-10 14:26 ` Dan Williams
2017-05-10 14:50 ` Kani, Toshimitsu [this message]
2017-05-10 17:37 ` 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=1494427797.30303.75.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.