Re: [dm-devel] [PATCH 09/11] block, nvme: Add error for reservation conflicts.

2022-06-06 Thread Keith Busch
On Fri, Jun 03, 2022 at 01:55:34AM -0500, Mike Christie wrote: > @@ -171,6 +171,7 @@ static const struct { > /* zone device specific errors */ > [BLK_STS_ZONE_OPEN_RESOURCE]= { -ETOOMANYREFS, "open zones > exceeded" }, > [BLK_STS_ZONE_ACTIVE_RESOURCE] = { -EOVERFLOW,

[dm-devel] [PATCH 03/11] scsi: Move sd_pr_type to header to share.

2022-06-06 Thread Mike Christie
LIO is going to want to do the same block to/from SCSI pr types as sd.c so this moves the sd_pr_type helper to a new file and adds a helper to go from the SCSI value to the block one. Signed-off-by: Mike Christie --- drivers/scsi/sd.c| 29 +-

[dm-devel] [PATCH 01/11] scsi: target: Rename sbc_ops to exec_cmd_ops

2022-06-06 Thread Mike Christie
The next patches allow us to call the block layer's pr_ops from the backends. This will require allowing the backends to hook into the cmd processing for SPC commands, so this renames sbc_ops to a more generic exec_cmd_ops. Signed-off-by: Mike Christie --- drivers/target/target_core_file.c|

Re: [dm-devel] [PATCH 09/11] block, nvme: Add error for reservation conflicts.

2022-06-06 Thread michael . christie
On 6/4/22 2:38 AM, Hannes Reinecke wrote: > On 6/3/22 21:45, Keith Busch wrote: >> On Fri, Jun 03, 2022 at 01:55:34AM -0500, Mike Christie wrote: >>> @@ -171,6 +171,7 @@ static const struct { >>>   /* zone device specific errors */ >>>   [BLK_STS_ZONE_OPEN_RESOURCE]    = { -ETOOMANYREFS,

Re: [dm-devel] [PATCH 0/8] Use block pr_ops in LIO

2022-06-06 Thread Mike Christie
On 6/4/22 11:01 PM, Bart Van Assche wrote: > On 6/2/22 23:55, Mike Christie wrote: >> The following patches were built over Linus's tree. They allow us to use >> the block pr_ops with LIO's target_core_iblock module to support cluster >> applications in VMs. >> >> Currently, to use something like

[dm-devel] [PATCH 06/11] dm: Add support for block PR read keys/reservation.

2022-06-06 Thread Mike Christie
This adds support in dm for the block PR read keys and read reservation callouts. Signed-off-by: Mike Christie --- drivers/md/dm.c | 44 1 file changed, 44 insertions(+) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 82957bd460e8..ca544dfc3210

Re: [dm-devel] [PATCH 0/8] Use block pr_ops in LIO

2022-06-06 Thread Mike Christie
On 6/3/22 6:46 AM, Christoph Hellwig wrote: > From a highlevel POV this looks good. I'll do a more detail review in > the next days once I find a little time. Any chance you could also > wire up the new ops for nvme so that we know the abtractions work right > even for exporting nvme as SCSI?

[dm-devel] [PATCH 08/11] scsi: target: Add block PR support to iblock.

2022-06-06 Thread Mike Christie
This adds support for the block PR callouts to target_core_iblock. This patch doesn't attempt to implement the entire spec because there's no way to test it all. It only supports what's required for windows clustering right now. Signed-off-by: Mike Christie ---

Re: [dm-devel] [PATCH 09/11] block, nvme: Add error for reservation conflicts.

2022-06-06 Thread Mike Christie
On 6/3/22 2:45 PM, Keith Busch wrote: > On Fri, Jun 03, 2022 at 01:55:34AM -0500, Mike Christie wrote: >> @@ -171,6 +171,7 @@ static const struct { >> /* zone device specific errors */ >> [BLK_STS_ZONE_OPEN_RESOURCE]= { -ETOOMANYREFS, "open zones >> exceeded" }, >>

[dm-devel] [PATCH 02/11] scsi: Rename sd_pr_command.

2022-06-06 Thread Mike Christie
Rename sd_pr_command to sd_pr_out_command to match a sd_pr_in_command helper added in the next patches. Signed-off-by: Mike Christie --- drivers/scsi/sd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index

[dm-devel] [PATCH 04/11] block: Add PR callouts for read keys and reservation

2022-06-06 Thread Mike Christie
Add callouts for reading keys and reservations. Note: This only initially adds the struct definitions in the kernel as I'm not sure if we wanted to export the interface to userspace yet. We may want to refine internally for LIO and when we can enable it for NVMe then add the finished interface to