Re: [dm-devel] [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Keith Busch
On Mon, Jan 08, 2018 at 04:34:36PM +0100, Christoph Hellwig wrote: > It's basically a kernel bug as it tries to access lbas that do not > exist. BLK_STS_TARGET should be fine. Okay, I'll fix this and address your other comments, and resend. Thanks for the feedback. -- dm-devel mailing list

Re: [dm-devel] [PATCH v6 2/2] dm: allow device-mapper to operate without dax support

2018-01-08 Thread Mike Snitzer
On Wed, Nov 29 2017 at 2:00pm -0500, Dan Williams wrote: > Change device-mapper's DAX dependency to require the presence of at > least one DAX_DRIVER. This allows device-mapper to be built without > bringing the DAX core along which is especially wasteful when there

Re: [dm-devel] [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER

2018-01-08 Thread Mike Snitzer
On Wed, Nov 29 2017 at 2:00pm -0500, Dan Williams wrote: > In support of allowing device-mapper to compile out idle/dead code when > there are no dax providers in the system, introduce the DAX_DRIVER > symbol. This is selected by all leaf drivers that device-mapper

Re: [dm-devel] [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper

2018-01-08 Thread Mike Snitzer
On Sun, Jan 07 2018 at 3:31pm -0500, Dan Williams wrote: > On Thu, Jan 4, 2018 at 10:12 AM, Mike Snitzer wrote: > > On Wed, Nov 29 2017 at 1:59pm -0500, > > Dan Williams wrote: > > > >> Changes since v5 [1]: > >> * Make

Re: [dm-devel] [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Christoph Hellwig
On Mon, Jan 08, 2018 at 10:29:33AM -0500, Mike Snitzer wrote: > No argument needed. Definitely needs fixing. Too many upper layers > consider BLK_STS_NOSPC retryable (XFS, ext4, dm-thinp, etc). Which > NVME_SC_LBA_RANGE absolutely isn't. > > When I backfilled NVME_SC_LBA_RANGE handling I

Re: [dm-devel] [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Mike Snitzer
On Mon, Jan 08 2018 at 5:19am -0500, Christoph Hellwig wrote: > On Mon, Jan 08, 2018 at 11:09:03AM +0100, Hannes Reinecke wrote: > > >> case NVME_SC_SUCCESS: > > >> return BLK_STS_OK; > > >> case NVME_SC_CAP_EXCEEDED: > > >> +case

Re: [dm-devel] [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Hannes Reinecke
On 01/08/2018 10:55 AM, Christoph Hellwig wrote: > On Thu, Jan 04, 2018 at 03:46:19PM -0700, Keith Busch wrote: >> This adds more NVMe status code translations to blk_status_t values, >> and captures all the current status codes NVMe multipath uses. >> >> Signed-off-by: Keith Busch

Re: [dm-devel] [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Christoph Hellwig
On Mon, Jan 08, 2018 at 11:09:03AM +0100, Hannes Reinecke wrote: > >>case NVME_SC_SUCCESS: > >>return BLK_STS_OK; > >>case NVME_SC_CAP_EXCEEDED: > >> + case NVME_SC_LBA_RANGE: > >>return BLK_STS_NOSPC; > > > > lba range isn't really enospc. It is returned when

Re: [dm-devel] [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Christoph Hellwig
On Thu, Jan 04, 2018 at 03:46:19PM -0700, Keith Busch wrote: > This adds more NVMe status code translations to blk_status_t values, > and captures all the current status codes NVMe multipath uses. > > Signed-off-by: Keith Busch > --- > drivers/nvme/host/core.c | 6 ++

Re: [dm-devel] [PATCH 0/5] Failover criteria unification

2018-01-08 Thread Christoph Hellwig
On Thu, Jan 04, 2018 at 04:47:27PM -0700, Keith Busch wrote: > It looks like you can also touch up dm to allow it to multipath nvme > even if CONFIG_NVME_MULTIPATH is set. It may be useful since native NVMe > doesn't multipath namespaces across subsystems, and some crack smoking > people want to

Re: [dm-devel] [PATCH 2/5] nvme/multipath: Consult blk_status_t for failover

2018-01-08 Thread Christoph Hellwig
> - if (unlikely(nvme_req(req)->status && nvme_req_needs_retry(req))) { > - if (nvme_req_needs_failover(req)) { > + blk_status_t status = nvme_error_status(req); > + > + if (unlikely(status != BLK_STS_OK && nvme_req_needs_retry(req))) { > + if

Re: [dm-devel] [PATCH 3/5] block: Provide blk_status_t decoding for retryable errors

2018-01-08 Thread Christoph Hellwig
> +static inline bool blk_retryable(blk_status_t error) The naming isn't really useful - it is about the fact that it's worth retrying on another path. So please chose a better name, and add a kerneldoc comment describing it. -- dm-devel mailing list dm-devel@redhat.com

Re: [dm-devel] [PATCH 5/5] dm mpath: Use blk_retryable

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 11:46 PM, Keith Busch wrote: > Uses common code for determining if an error should be retried on > alternate path. > > Signed-off-by: Keith Busch > --- > drivers/md/dm-mpath.c | 19 ++- > 1 file changed, 2 insertions(+), 17 deletions(-) >

Re: [dm-devel] [PATCH 4/5] nvme/multipath: Use blk_retryable

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 11:46 PM, Keith Busch wrote: > Uses common code for determining if an error should be retried on > alternate path. > > Signed-off-by: Keith Busch > --- > drivers/nvme/host/multipath.c | 14 +- > 1 file changed, 1 insertion(+), 13 deletions(-) >

Re: [dm-devel] [PATCH 2/5] nvme/multipath: Consult blk_status_t for failover

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 11:46 PM, Keith Busch wrote: > This removes nvme multipath's specific status decoding to see if failover > is needed, using the generic blk_status_t that was translated earlier. This > abstraction from the raw NVMe status means nvme status decoding exists > in just one place. > >

Re: [dm-devel] [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 11:46 PM, Keith Busch wrote: > This adds more NVMe status code translations to blk_status_t values, > and captures all the current status codes NVMe multipath uses. > > Signed-off-by: Keith Busch > --- > drivers/nvme/host/core.c | 6 ++ > 1 file changed,

Re: [dm-devel] [PATCH 3/5] block: Provide blk_status_t decoding for retryable errors

2018-01-08 Thread Hannes Reinecke
On 01/04/2018 11:46 PM, Keith Busch wrote: > This patch provides a common decoder for block status that may be retried > so various entities wishing to consult this do not have to duplicate > this decision. > > Signed-off-by: Keith Busch > --- > include/linux/blk_types.h