All of lore.kernel.org
 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: Mon, 21 Dec 2015 18:50:54 +0000	[thread overview]
Message-ID: <1450723855.5616.15.camel@intel.com> (raw)
In-Reply-To: <CAPcyv4je_6LPzfULJrGdkDRnc0mzc_ftd=t9942N2UO9rQZe0A@mail.gmail.com>

On Sun, 2015-12-20 at 17:20 -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(+)
> 
> I think we should move this new functionality to the core because
> there is not much pmem driver specific.  It's all generic nvdimm-core
> and block-core functionality.  The only missing information the core
> routine needs is the gendisk and a data offset (if sector-zero is at
> an offset from the base address range of the namespace).  Something
> like:
> 
> nvdimm_namespace_disk_poison(struct nd_namespace_common *ndns,
>     resource_size_t offset, struct gendisk *disk)

This should be easy to do, however isn't it a bit counter-intuitive to
move this into core? The lower level drivers pmem/blk/btt are all owners
of their respective gendisks, and so doesn't it make more sense for them
to be in control of manipulating their gendisk data. Also, I can see
moving them if this was a common operation, but only pmem will ever need
to do this..

I'm not too strongly opposed to this however - the one thing that did
feel a bit awkward being in pmem was that we ask core for a struct
list_head and then walk it ourselves - pmem doesn't normally know about
the internals of nvdimm_bus, but with this we implicitly make it aware.

  reply	other threads:[~2015-12-21 18:50 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 [this message]
2015-12-21 19:10       ` Dan Williams
2015-12-23 20:28   ` Dan Williams
2015-12-23 20:32     ` Verma, Vishal L
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=1450723855.5616.15.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 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.