Merge patch series "Use block pr_ops in LIO"
authorMartin K. Petersen <martin.petersen@oracle.com>
Mon, 22 May 2023 20:35:02 +0000 (16:35 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 22 May 2023 20:35:02 +0000 (16:35 -0400)
commit7907ad748bdba8ac9ca47f0a650cc2e5d2ad6e24
tree068ffd5248c8c988015fc751fe8b68dd51347943
parent16853cd8f6d44d774f683d670be38c7d91eb32b8
parent394f811848827ad23d2b43e94e5d72a24cfbc39f
Merge patch series "Use block pr_ops in LIO"

Mike Christie <michael.christie@oracle.com> says:

The patches in this thread allow us to use the block pr_ops with LIO's
target_core_iblock module to support cluster applications in VMs. They
were built over Linus's tree. They also apply over linux-next and
Martin's tree and Jens's trees.

Currently, to use windows clustering or linux clustering (pacemaker +
cluster labs scsi fence agents) in VMs with LIO and vhost-scsi, you
have to use tcmu or pscsi or use a cluster aware FS/framework for the
LIO pr file. Setting up a cluster FS/framework is pain and waste when
your real backend device is already a distributed device, and pscsi
and tcmu are nice for specific use cases, but iblock gives you the
best performance and allows you to use stacked devices like
dm-multipath. So these patches allow iblock to work like pscsi/tcmu
where they can pass a PR command to the backend module. And then
iblock will use the pr_ops to pass the PR command to the real devices
similar to what we do for unmap today.

The patches are separated in the following groups:

Patch 1 - 2:

 - Add block layer callouts for reading reservations and rename reservation
   error code.

Patch 3 - 5:

 - SCSI support for new callouts.

Patch 6:

 - DM support for new callouts.

Patch 7 - 13:

 - NVMe support for new callouts.

Patch 14 - 18:

 - LIO support for new callouts.

This patchset has been tested with the libiscsi PGR ops and with
window's failover cluster verification test. Note that for scsi
backend devices we need this patchset:

https://lore.kernel.org/linux-scsi/20230123221046.125483-1-michael.christie@oracle.com/T/#m4834a643ffb5bac2529d65d40906d3cfbdd9b1b7

to handle UAs. To reduce the size of this patchset that's being done
separately to make reviewing easier. And to make merging easier this
patchset and the one above do not have any conflicts so can be merged
in different trees.

Link: https://lore.kernel.org/r/20230407200551.12660-1-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
block/blk-core.c
drivers/md/dm.c
drivers/nvme/host/core.c
drivers/s390/block/dasd.c
drivers/scsi/sd.c
drivers/target/target_core_pr.c
drivers/target/target_core_spc.c
include/linux/blk_types.h
include/linux/nvme.h
include/target/target_core_base.h