Re: [dm-devel] RFC: one more time: SCSI device identification

2021-04-16 Thread Martin Wilck
Hello Martin, Sorry for the late response, still recovering from a week out of office. On Tue, 2021-04-06 at 00:47 -0400, Martin K. Petersen wrote: > > Martin, > > > The kernel's preference for type 8 designators (see below) is in > > contrast with the established user space algorithms, which

[dm-devel] [PATCH v2 1/3] dm: Introduce zone append support control

2021-04-16 Thread Damien Le Moal
Add the boolean field zone_append_not_supported to the dm_target structure to allow a target implementing a zoned block device to explicitly opt out from zone append (REQ_OP_ZONE_APPEND) operations support. When set to true by the target constructor, the target device queue limit

[dm-devel] [PATCH v2 3/3] zonefs: fix synchronous write to sequential zone files

2021-04-16 Thread Damien Le Moal
Synchronous writes to sequential zone files cannot use zone append operations if the underlying zoned device queue limit max_zone_append_sectors is 0, indicating that the device does not support this operation. In this case, fall back to using regular write operations. Fixes: 02ef12a663c7

[dm-devel] [PATCH v2 2/3] dm crypt: Fix zoned block device support

2021-04-16 Thread Damien Le Moal
Zone append BIOs (REQ_OP_ZONE_APPEND) always specify the start sector of the zone to be written instead of the actual location sector to write. The write location is determined by the device and returned to the host upon completion of the operation. This interface, while simple and efficient for

[dm-devel] [PATCH v2 0/3] Fix dm-crypt zoned block device support

2021-04-16 Thread Damien Le Moal
Mike, Zone append BIOs (REQ_OP_ZONE_APPEND) always specify the start sector of the zone to be written instead of the actual location sector to write. The write location is determined by the device and returned to the host upon completion of the operation. This interface, while simple and

Re: [dm-devel] [PATCH v4 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 7:53pm -0400, Mike Snitzer wrote: > Hi, > > This patchset reflects changes needed to make NVMe error handling and > ANA state updates work well with dm-multipath (which always sets > REQ_FAILFAST_TRANSPORT). > > RHEL8 has been carrying an older ~5.9 based version of

[dm-devel] [PATCH v4 1/3] nvme: return BLK_STS_DO_NOT_RETRY if the DNR bit is set

2021-04-16 Thread Mike Snitzer
If the DNR bit is set we should not retry the command. We care about the retryable vs not retryable distinction at the block layer so propagate the equivalent of the DNR bit by introducing BLK_STS_DO_NOT_RETRY. Update blk_path_error() to _not_ retry if it is set. This change runs with the

[dm-devel] [PATCH v3 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-16 Thread Mike Snitzer
Hi, This patchset reflects changes needed to make NVMe error handling and ANA state updates work well with dm-multipath (which always sets REQ_FAILFAST_TRANSPORT). RHEL8 has been carrying an older ~5.9 based version of this patchset (since RHEL8.3, August 2020). RHEL9 is coming, would really

[dm-devel] [PATCH v4 3/3] nvme: decouple basic ANA log page re-read support from native multipathing

2021-04-16 Thread Mike Snitzer
Whether or not ANA is present is a choice of the target implementation; the host (and whether it supports multipathing) has _zero_ influence on this. If the target declares a path as 'inaccessible' the path _is_ inaccessible to the host. As such, ANA support should be functional even if native

[dm-devel] [PATCH v4 2/3] nvme: allow local retry and proper failover for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
REQ_FAILFAST_TRANSPORT is set by upper layer software that handles multipathing. Unlike SCSI, NVMe's error handling was specifically designed to handle local retry for non-path errors. As such, allow NVMe's local retry mechanism to be used for requests marked with REQ_FAILFAST_TRANSPORT. In this

[dm-devel] [PATCH v3 4/4] nvme: decouple basic ANA log page re-read support from native multipathing

2021-04-16 Thread Mike Snitzer
Whether or not ANA is present is a choice of the target implementation; the host (and whether it supports multipathing) has _zero_ influence on this. If the target declares a path as 'inaccessible' the path _is_ inaccessible to the host. As such, ANA support should be functional even if native

[dm-devel] [PATCH v3 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is set by multipathing software (e.g. dm-multipath) before it issues IO. Update NVMe to allow failover of requests marked with either REQ_NVME_MPATH or

[dm-devel] [PATCH v3 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Mike Snitzer
From: Chao Leng REQ_FAILFAST_TRANSPORT was designed for SCSI, because the SCSI protocol does not define the local retry mechanism. SCSI implements a fuzzy local retry mechanism, so REQ_FAILFAST_TRANSPORT is needed to allow higher-level multipathing software to perform failover/retry. NVMe is

[dm-devel] [PATCH v3 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-16 Thread Mike Snitzer
Hi, This patchset reflects changes needed to make NVMe error handling and ANA state updates work well with dm-multipath (which always sets REQ_FAILFAST_TRANSPORT). RHEL8 has been carrying an older ~5.9 based version of this patchset (since RHEL8.3, August 2020). RHEL9 is coming, would really

[dm-devel] [PATCH v3 1/4] nvme: return BLK_STS_DO_NOT_RETRY if the DNR bit is set

2021-04-16 Thread Mike Snitzer
If the DNR bit is set we should not retry the command. We care about the retryable vs not retryable distinction at the block layer so propagate the equivalent of the DNR bit by introducing BLK_STS_DO_NOT_RETRY. Update blk_path_error() to _not_ retry if it is set. This change runs with the

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 4:52pm -0400, Ewan D. Milne wrote: > On Thu, 2021-04-15 at 19:15 -0400, Mike Snitzer wrote: > > If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry > > IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is > > set by multipathing software

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Ewan D. Milne
On Thu, 2021-04-15 at 19:15 -0400, Mike Snitzer wrote: > If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry > IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is > set by multipathing software (e.g. dm-multipath) before it issues IO. > > Update NVMe to allow

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Ewan D. Milne
On Fri, 2021-04-16 at 16:07 +0200, Hannes Reinecke wrote: > > Hmm. Quite convoluted, methinks. > Shouldn't this achieve the same thing? > > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index e89ec2522ca6..8c36a2196b66 100644 > --- a/drivers/nvme/host/core.c > +++

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Hannes Reinecke
On 4/16/21 5:03 PM, Mike Snitzer wrote: > On Fri, Apr 16 2021 at 10:07am -0400, > Hannes Reinecke wrote: > >> On 4/16/21 1:15 AM, Mike Snitzer wrote: >>> If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry >>> IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is

Re: [dm-devel] [PATCH v2 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 11:20am -0400, Hannes Reinecke wrote: > On 4/16/21 4:53 PM, Mike Snitzer wrote: > > On Fri, Apr 16 2021 at 10:01am -0400, > > Hannes Reinecke wrote: > > > >> On 4/16/21 1:15 AM, Mike Snitzer wrote: > >>> From: Chao Leng > >>> > >>> REQ_FAILFAST_TRANSPORT was designed

Re: [dm-devel] [PATCH v2 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Hannes Reinecke
On 4/16/21 4:53 PM, Mike Snitzer wrote: > On Fri, Apr 16 2021 at 10:01am -0400, > Hannes Reinecke wrote: > >> On 4/16/21 1:15 AM, Mike Snitzer wrote: >>> From: Chao Leng >>> >>> REQ_FAILFAST_TRANSPORT was designed for SCSI, because the SCSI protocol >>> does not define the local retry

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 10:07am -0400, Hannes Reinecke wrote: > On 4/16/21 1:15 AM, Mike Snitzer wrote: > > If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry > > IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is > > set by multipathing software (e.g.

Re: [dm-devel] [PATCH v2 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 10:01am -0400, Hannes Reinecke wrote: > On 4/16/21 1:15 AM, Mike Snitzer wrote: > > From: Chao Leng > > > > REQ_FAILFAST_TRANSPORT was designed for SCSI, because the SCSI protocol > > does not define the local retry mechanism. SCSI implements a fuzzy > > local retry

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Hannes Reinecke
On 4/16/21 1:15 AM, Mike Snitzer wrote: > If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry > IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is > set by multipathing software (e.g. dm-multipath) before it issues IO. > > Update NVMe to allow failover of

Re: [dm-devel] [PATCH v2 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Hannes Reinecke
On 4/16/21 1:15 AM, Mike Snitzer wrote: > From: Chao Leng > > REQ_FAILFAST_TRANSPORT was designed for SCSI, because the SCSI protocol > does not define the local retry mechanism. SCSI implements a fuzzy > local retry mechanism, so REQ_FAILFAST_TRANSPORT is needed to allow > higher-level

Re: [dm-devel] [PATCH v2 1/4] nvme: return BLK_STS_DO_NOT_RETRY if the DNR bit is set

2021-04-16 Thread Hannes Reinecke
On 4/16/21 1:15 AM, Mike Snitzer wrote: > If the DNR bit is set we should not retry the command. > > We care about the retryable vs not retryable distinction at the block > layer so propagate the equivalent of the DNR bit by introducing > BLK_STS_DO_NOT_RETRY. Update blk_path_error() to _not_

Re: [dm-devel] [PATCH 2/4] dm crypt: Fix zoned block device support

2021-04-16 Thread Johannes Thumshirn
On 16/04/2021 09:30, Damien Le Moal wrote: > On 2021/04/16 16:13, Johannes Thumshirn wrote: >> On 16/04/2021 05:05, Damien Le Moal wrote: >> >> [...] >> >>> + CRYPT_IV_NO_SECTORS,/* IV calculation does not use sectors >>> */ >> >> [...] >> >>> - if (ivmode == NULL) >>> + if

Re: [dm-devel] [PATCH] block: introduce QUEUE_FLAG_POLL_CAP flag

2021-04-16 Thread Ming Lei
On Fri, Apr 16, 2021 at 04:00:37PM +0800, Jeffle Xu wrote: > Hi, > How about this patch to remove the extra poll_capable() method? > > And the following 'dm: support IO polling for bio-based dm device' needs > following change. > > ``` > + /* > +* Check for request-based device is

[dm-devel] [PATCH] block: introduce QUEUE_FLAG_POLL_CAP flag

2021-04-16 Thread Jeffle Xu
Hi, How about this patch to remove the extra poll_capable() method? And the following 'dm: support IO polling for bio-based dm device' needs following change. ``` + /* +* Check for request-based device is remained to +*

Re: [dm-devel] [PATCH V5 11/12] block: add poll_capable method to support bio-based IO polling

2021-04-16 Thread JeffleXu
On 4/15/21 6:06 PM, Ming Lei wrote: > On Thu, Apr 15, 2021 at 05:21:56PM +0800, JeffleXu wrote: >> >> >> On 4/15/21 3:43 PM, Ming Lei wrote: >>> On Thu, Apr 15, 2021 at 09:34:36AM +0800, JeffleXu wrote: On 4/14/21 7:24 PM, Ming Lei wrote: > On Wed, Apr 14, 2021 at 04:38:25PM

Re: [dm-devel] [PATCH V5 11/12] block: add poll_capable method to support bio-based IO polling

2021-04-16 Thread JeffleXu
On 4/15/21 3:43 PM, Ming Lei wrote: > On Thu, Apr 15, 2021 at 09:34:36AM +0800, JeffleXu wrote: >> >> >> On 4/14/21 7:24 PM, Ming Lei wrote: >>> On Wed, Apr 14, 2021 at 04:38:25PM +0800, JeffleXu wrote: On 4/12/21 5:38 PM, Christoph Hellwig wrote: > On Thu, Apr 01, 2021 at

Re: [dm-devel] [PATCH V5 11/12] block: add poll_capable method to support bio-based IO polling

2021-04-16 Thread JeffleXu
On 4/14/21 7:24 PM, Ming Lei wrote: > On Wed, Apr 14, 2021 at 04:38:25PM +0800, JeffleXu wrote: >> >> >> On 4/12/21 5:38 PM, Christoph Hellwig wrote: >>> On Thu, Apr 01, 2021 at 10:19:26AM +0800, Ming Lei wrote: From: Jeffle Xu This method can be used to check if bio-based

Re: [dm-devel] [PATCH 2/4] dm crypt: Fix zoned block device support

2021-04-16 Thread Damien Le Moal
On 2021/04/16 16:13, Johannes Thumshirn wrote: > On 16/04/2021 05:05, Damien Le Moal wrote: > > [...] > >> +CRYPT_IV_NO_SECTORS,/* IV calculation does not use sectors >> */ > > [...] > >> -if (ivmode == NULL) >> +if (ivmode == NULL) { >> cc->iv_gen_ops =

Re: [dm-devel] [PATCH 2/4] dm crypt: Fix zoned block device support

2021-04-16 Thread Johannes Thumshirn
On 16/04/2021 05:05, Damien Le Moal wrote: [...] > + CRYPT_IV_NO_SECTORS,/* IV calculation does not use sectors > */ [...] > - if (ivmode == NULL) > + if (ivmode == NULL) { > cc->iv_gen_ops = NULL; > - else if (strcmp(ivmode, "plain") == 0) > +

Re: [dm-devel] [PATCH 4/4] zonefs: fix synchronous write to sequential zone files

2021-04-16 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 1/4] dm: Introduce zone append support control

2021-04-16 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel