linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>
Cc: "ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"jmoyer@redhat.com" <jmoyer@redhat.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linda.knippers@hpe.com" <linda.knippers@hpe.com>
Subject: Re: [PATCH 3/3] pmem: Use the poison list to expose badblocks
Date: Wed, 23 Dec 2015 20:32:39 +0000	[thread overview]
Message-ID: <1450902759.5616.29.camel@intel.com> (raw)
In-Reply-To: <CAPcyv4ibCPhqAm-612CvQNEeZrpSsuhw8eH5xBdJtr4BHpPZ2Q@mail.gmail.com>

On Wed, 2015-12-23 at 12:28 -0800, Dan Williams wrote:
> On Sun, Dec 20, 2015 at 1:18 AM,  <vishal@kernel.org> wrote:
> > From: Vishal Verma <vishal.l.verma@intel.com>
> > 
> > Enable the gendisk badblocks feature for pmem namespaces.
> > If the pmem namespace being created has any known poison associated
> > with
> > its physical address space, convert the poison ranges to bad sectors
> > exposed using the badblocks interface.
> > 
> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> > ---
> >  drivers/nvdimm/pmem.c | 124
> > ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 124 insertions(+)
> > 
> > diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> > index 8ee7989..462570f 100644
> > --- a/drivers/nvdimm/pmem.c
> > +++ b/drivers/nvdimm/pmem.c
> [..]
> > @@ -196,6 +311,15 @@ static int pmem_attach_disk(struct device *dev,
> >         set_capacity(disk, (pmem->size - pmem->data_offset) / 512);
> >         pmem->pmem_disk = disk;
> > 
> > +       ret = disk_alloc_badblocks(disk);
> > +       if (ret)
> > +               return ret;
> 
> I think we should skip allocating a bad block list in the case we find
> no poison.  Then we can do a simple "if (disk->bb)" to check if there
> are any bad blocks.

Sounds good - I'll move this allocation into the (what will be a core)
routine that traverses the list, and make it such that we allocate
disk->bb iff a poison entry is found for _this_ pmem range.

It will mean a check at every list node, but that shouldn't matter as
this is just init-time overhead.

	-Vishal

  reply	other threads:[~2015-12-23 20:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-20  9:18 [PATCH 0/3] Expose known poison in SPA ranges to the block layer vishal
2015-12-20  9:18 ` [PATCH 1/3] nfit_test: Enable DSMs for all test NFITs vishal
2015-12-20  9:18 ` [PATCH 2/3] libnvdimm: Add a poison list vishal
2015-12-20  9:18 ` [PATCH 3/3] pmem: Use the poison list to expose badblocks vishal
2015-12-20  9:31   ` kbuild test robot
2015-12-21  1:20   ` Dan Williams
2015-12-21 18:50     ` Verma, Vishal L
2015-12-21 19:10       ` Dan Williams
2015-12-23 20:28   ` Dan Williams
2015-12-23 20:32     ` Verma, Vishal L [this message]
2015-12-23 20:38       ` Dan Williams
2015-12-21 18:34 ` [PATCH 0/3] Expose known poison in SPA ranges to the block layer Verma, Vishal L
2015-12-21 21:06 ` Linda Knippers

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=1450902759.5616.29.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=jmoyer@redhat.com \
    --cc=linda.knippers@hpe.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=ross.zwisler@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).