This adds a helper to go from the NVMe spec PR type value to the block
layer pr_type, so for Reservation Report support we can convert from its
value.
Signed-off-by: Mike Christie
---
drivers/nvme/host/core.c | 20
1 file changed, 20 insertions(+)
diff --git a/drivers/nvme/
This patch adds support for the pr_ops read_reservation callout by
calling the NVMe Reservation Report helper. It then parses that info to
detect if there is a reservation and if there is then convert the
returned info to a pr_ops pr_held_reservation struct.
Signed-off-by: Mike Christie
---
driv
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
support it all like SPEC_I_PT and ALL_TG_PT. This only supports
exporting the iblock device from one path on the local target.
Signed-off-by: Mike Chris
Export scsi_result_to_blk_status so the sd pr_ops can get a BLK_STS error
that can be returned to other kernel pr ops users.
Signed-off-by: Mike Christie
---
drivers/scsi/scsi_lib.c | 3 ++-
include/scsi/scsi_cmnd.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/sc
This patch adds support for the pr_ops read_keys callout by calling the
NVMe Reservation Report helper, then parsing that info to get the
controller's registered keys. Because the callout is only used in the
kernel where the callers do not know about controller/host IDs, the
callout just returns th
This patch has the nvme pr_ops convert from a nvme status value to a
blk_status_t.
Signed-off-by: Mike Christie
---
drivers/nvme/host/core.c | 54 ++--
1 file changed, 36 insertions(+), 18 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host
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
Reviewed-by: Christoph Hellwig
---
drivers/scsi/sd.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/
This adds a helper to execute the Reservation Report. The next patches
will then convert call it and convert that info to read_keys and
read_reservation.
Signed-off-by: Mike Christie
---
drivers/nvme/host/core.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/dri
It's common to get a UA when doing PR commands. It could be due to a
target restarting, transport level relogin or other PR commands like a
release causing it. The upper layers don't get the sense and in some cases
have no idea if it's a SCSI device, so this has the sd layer retry.
Signed-off-by:
Kernel pr_ops users like LIO need to be able to know about if a failure
was a result of a reservation conflict and then be able to convert
from the lower level's definition of that error to SCSI so it can be
returned to the initiator. To do this they currently have to know the
lower level device ty
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
Reviewed-by: Christoph Hellwig
---
drivers
For the cases where you want to export a device to a VM via a single
I_T nexus and want to passthrough the PR handling to the physical/real
device you have to use pscsi or tcmu. Both are good for specific uses
however for the case where you want good performance, and are not using
SCSI devices dire
The pr_ops don't support SCSI-2 RESERVE/RELEASE so fail them during
parsing.
Signed-off-by: Mike Christie
---
drivers/target/target_core_spc.c | 25 +++--
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_c
This patch has the sd pr_ops convert from the low level SCSI errors to a
blk_status_t.
Signed-off-by: Mike Christie
---
drivers/scsi/sd.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 61e88c7ffa44..31b
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 60549b65c799..1b15295bdf24
The following patches were built over Linus's tree and this patchset
which fixes some scsi error handling issues:
https://lore.kernel.org/linux-scsi/1136e369-49b0-c3ef-340a-ab337f514...@oracle.com/T/#meebd5040bc360f8c86532b792b48dbe3efe88619
The patches allow us to use the block pr_ops with LIO's
This fixes the following issues with the reservation status structs:
1. resv10 is bytes 23:10 so it should be 14 bytes.
2. regctl_ds only supports 64 bit host IDs.
Signed-off-by: Mike Christie
---
include/linux/nvme.h | 33 +
1 file changed, 25 insertions(+), 8 d
Reservation Report support needs to pass in a variable sized buffer, so
this patch has the pr command helpers take a data length argument.
Signed-off-by: Mike Christie
---
drivers/nvme/host/core.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/nvme/hos
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
Reviewed-by: Christoph Hellwig
---
drivers/scsi/sd.c| 29 +
Add callouts for reading keys and reservations. This allows LIO to support
the READ_KEYS and READ_RESERVATION commands and will allow dm-multipath
to optimize it's error handling so it can check if it's getting an error
because there's an existing reservation or if we need to retry different
paths.
This adds support in sd.c for the block PR read keys and read reservation
callouts.
Signed-off-by: Mike Christie
---
drivers/scsi/sd.c | 88 +++
include/scsi/scsi_proto.h | 5 +++
2 files changed, 93 insertions(+)
diff --git a/drivers/scsi/sd.c b/dri
On Fri, 5 Aug 2022, Dan Carpenter wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
> head: b44f2fd87919b5ae6e1756d4c7ba2cbba22238e1
> commit: df699cc16ea5ef93a917676dcdd4376e02860ad5 dm writecache: report
> invalid return from writecache_map helpe
22 matches
Mail list logo