On 4/12/23 5:25 AM, Naresh Kamboju wrote:
> On Wed, 12 Apr 2023 at 15:06, Naresh Kamboju
> wrote:
>>
>> [sorry for the adding you in CC]
>>
>> While running LTP controllers test suite on this patch set applied on top of
>> the next-20230406 and the following kernel panic noticed on qemu-i386.
>
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
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Bart Van Assche
---
drivers/scsi/sd.c | 12 ++--
1 file changed, 6
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 scsi_common and renames it. The
next patch will then also add a helper to go from the SCSI value to the
block one for use with PERSISTENT_RESERVE_IN commands.
Signed-off-by: Mike
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
Reviewed
.
Signed-off-by: Mike Christie
Acked-by: Stefan Haberland
Reviewed-by: Bart Van Assche
---
block/blk-core.c | 2 +-
drivers/nvme/host/core.c | 2 +-
drivers/s390/block/dasd.c | 7 ++-
drivers/scsi/scsi_lib.c | 2 +-
include/linux/blk_types.h | 4 ++--
5 files changed, 11 insertions
Add callouts for reading keys and reservations. This allows LIO to support
the READ_KEYS and READ_RESERVATION commands so it can export devices to
VMs for software like windows clustering.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Christoph Hellwig
Reviewed
if the
command is supported based on the command and service action and device
settings.
Signed-off-by: Mike Christie
---
drivers/target/target_core_spc.c | 40 +++
include/target/target_core_base.h | 3 ++-
2 files changed, 27 insertions(+), 16 deletions(-)
diff --git
Move the code that checks for multipath support and sends the pr command
to a new helper so it can be used by the reservation report support added
in the next patches.
Signed-off-by: Mike Christie
Reviewed-by: Christoph Hellwig
---
drivers/nvme/host/pr.c | 23 ++-
1 file
I_T nexus.
This patch adds the initial LIO callouts. The next patch will modify
iblock.
Signed-off-by: Mike Christie
Reviewed-by: Christoph Hellwig
---
drivers/target/target_core_pr.c | 62 +++-
include/target/target_core_backend.h | 4 ++
2 files changed, 65
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
Reviewed-by: Christoph Hellwig
Reviewed-by: Keith Busch
Reviewed-by: Chaitanya Kulkarni
---
drivers/nvme/host/core.c | 13
-by: Mike Christie
---
include/linux/nvme.h | 38 ++
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 779507ac750b..83704fc04a94 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -759,20
The backend modules don't know about ports and I_T nexuses and the pr_ops
callouts the modules will use don't support the old RESERVE/RELEASE
commands. This patch has us report we don't support those types of
commands and fail them.
Signed-off-by: Mike Christie
---
drivers/target
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
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
This adds support in sd.c for the block PR read keys and read reservation
callouts, so upper layers like LIO can get the PR info that's been setup
using the existing pr callouts and return it to initiators.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Christoph
just returns the registered keys which is required by the SCSI
PR in READ KEYS command.
Signed-off-by: Mike Christie
---
drivers/nvme/host/pr.c | 69 ++
include/linux/nvme.h | 4 +++
2 files changed, 73 insertions(+)
diff --git a/drivers/nvme/host/pr.c b
function.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Christoph Hellwig
---
drivers/nvme/host/pr.c | 24
include/linux/nvme.h | 9 +
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/drivers/nvme/host/pr.c b/drivers
This patch moves the pr code to it's own file because I'm going to be
adding more functions and core.c is getting bigger.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Keith Busch
---
drivers/nvme/host/Makefile | 2 +-
drivers/nvme/host/core.c | 148
This adds support in dm for the block PR read keys and read reservation
callouts.
Signed-off-by: Mike Christie
---
drivers/md/dm.c | 69 +
1 file changed, 69 insertions(+)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index dfde0088147a
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
328]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url:
> https://github.com/intel-lab-lkp/linux/commits/Mike-
On 3/28/23 11:36 AM, Mike Snitzer wrote:
> On Fri, Mar 24 2023 at 2:17P -0400,
> Mike Christie wrote:
>
>> 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 opti
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
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
if the
command is supported based on the command and service action and device
settings.
Signed-off-by: Mike Christie
---
drivers/target/target_core_spc.c | 40 +++
include/target/target_core_base.h | 3 ++-
2 files changed, 27 insertions(+), 16 deletions(-)
diff --git
and
NVMe's report reservation commands. Those are overkill for dm/LIO and
READ_FULL_STATUS is sometimes broken for SCSI devices.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Christoph Hellwig
---
include/linux/pr.h | 25 +
1 file changed, 25
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. The next patch will
then also add a helper to go from the SCSI value to the block one for use
with PERSISTENT_RESERVE_IN commands.
Signed-off-by: Mike Christie
Reviewed
The backend modules don't know about ports and I_T nexuses and the pr_ops
callouts the modules will use don't support the old RESERVE/RELEASE
commands. This patch has us report we don't support those types of
commands and fail them.
Signed-off-by: Mike Christie
---
drivers/target
I_T nexus.
This patch adds the initial LIO callouts. The next patch will modify
iblock.
Signed-off-by: Mike Christie
Reviewed-by: Christoph Hellwig
---
drivers/target/target_core_pr.c | 62 +++-
include/target/target_core_backend.h | 4 ++
2 files changed, 65
just returns the registered keys which is required by the SCSI
PR in READ KEYS command.
Signed-off-by: Mike Christie
---
drivers/nvme/host/pr.c | 69 ++
include/linux/nvme.h | 4 +++
2 files changed, 73 insertions(+)
diff --git a/drivers/nvme/host/pr.c b
function.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Christoph Hellwig
---
drivers/nvme/host/pr.c | 24
include/linux/nvme.h | 9 +
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/drivers/nvme/host/pr.c b/drivers
.
Signed-off-by: Mike Christie
Acked-by: Stefan Haberland
---
block/blk-core.c | 2 +-
drivers/nvme/host/core.c | 2 +-
drivers/s390/block/dasd.c | 7 ++-
drivers/scsi/scsi_lib.c | 2 +-
include/linux/blk_types.h | 4 ++--
5 files changed, 11 insertions(+), 6 deletions(-)
diff --git
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
Reviewed
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
Move the code that checks for multipath support and sends the pr command
to a new helper so it can be used by the reservation report support added
in the next patches.
Signed-off-by: Mike Christie
Reviewed-by: Christoph Hellwig
---
drivers/nvme/host/pr.c | 23 ++-
1 file
This adds support in dm for the block PR read keys and read reservation
callouts.
Signed-off-by: Mike Christie
---
drivers/md/dm.c | 69 +
1 file changed, 69 insertions(+)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f5cc330bb549
This adds support in sd.c for the block PR read keys and read reservation
callouts, so upper layers like LIO can get the PR info that's been setup
using the existing pr callouts and return it to initiators.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Christoph
This patch moves the pr code to it's own file because I'm going to be
adding more functions and core.c is getting bigger.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Keith Busch
---
drivers/nvme/host/Makefile | 2 +-
drivers/nvme/host/core.c | 148
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
Reviewed-by: Chaitanya Kulkarni
---
drivers/scsi/sd.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff
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
Reviewed-by: Christoph Hellwig
Reviewed-by: Keith Busch
Reviewed-by: Chaitanya Kulkarni
---
drivers/nvme/host/core.c | 13
-by: Mike Christie
---
include/linux/nvme.h | 38 ++
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 779507ac750b..83704fc04a94 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -759,20
On 3/15/23 12:40 AM, Christoph Hellwig wrote:
> On Tue, Mar 14, 2023 at 05:23:16PM -0500, Mike Christie wrote:
>> We could do separate structs though:
>
> I suspect that's probably better in the long run, as the [0] notation
> is on its way out.
Ok. I was able to use th
On 3/20/23 8:06 AM, Christoph Hellwig wrote:
> On Thu, Mar 16, 2023 at 11:36:12AM -0500, Mike Christie wrote:
>> I think we are ok for dasd using BLK_STS_RESV_CONFLICT.
>>
>> It thought it sounded similar to SCSI/NVMe and userspace will still
>> see -EBADE beca
On 3/16/23 5:17 AM, Stefan Haberland wrote:
> Am 15.03.23 um 14:30 schrieb Christoph Hellwig:
>> On Wed, Mar 15, 2023 at 11:04:22AM +0100, Stefan Haberland wrote:
>>> This also fits for the DASD case. We use this error code for a
>>> reservation/locking conflict of the DASD device when the lock we
On 3/14/23 12:15 PM, Christoph Hellwig wrote:
> On Fri, Feb 24, 2023 at 11:44:51AM -0600, Mike Christie wrote:
>> +__u8resv10[14];
>> +union {
>> +struct {
>> +__u8rsvd24[40];
>> +struct nvme
On 2/24/23 3:04 PM, kernel test robot wrote:
>
>drivers/nvme/host/pr.c: In function 'block_pr_type_from_nvme':
>>> drivers/nvme/host/pr.c:43:24: warning: implicit conversion from 'enum
>>> nvme_pr_type' to 'enum pr_type' [-Wenum-conversion]
> 43 | return
On 3/5/23 3:28 PM, Chaitanya Kulkarni wrote:
>>
>> +static int nvme_send_pr_command(struct block_device *bdev,
>> +struct nvme_command *c, void *data, unsigned int data_len)
>> +{
>> +if (IS_ENABLED(CONFIG_NVME_MULTIPATH) &&
>> +bdev->bd_disk->fops == _ns_head_ops)
>> +
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. They could also apply over Jens's tree but it needs the
scsi_execute_cmd
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
Reviewed-by: Christoph Hellwig
Reviewed-by: Keith Busch
Reviewed-by: Chaitanya Kulkarni
---
drivers/nvme/host/core.c | 13
I_T nexus.
This patch adds the initial LIO callouts. The next patch will modify
iblock.
Signed-off-by: Mike Christie
Reviewed-by: Christoph Hellwig
---
drivers/target/target_core_pr.c | 62 +++-
include/target/target_core_backend.h | 4 ++
2 files changed, 65
This patch moves the pr code to it's own file because I'm going to be
adding more functions and core.c is getting bigger.
Signed-off-by: Mike Christie
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Keith Busch
---
drivers/nvme/host/Makefile | 2 +-
drivers/nvme/host/core.c | 148
This adds support in sd.c for the block PR read keys and read reservation
callouts, so upper layers like LIO can get the PR info that's been setup
using the existing pr callouts and return it to initiators.
Signed-off-by: Mike Christie
---
drivers/scsi/sd.c| 91
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
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
The backend modules don't know about ports and I_T nexuses and the pr_ops
callouts the modules will use don't support the old RESERVE/RELEASE
commands. This patch has us report we don't support those types of
commands and fail them.
Signed-off-by: Mike Christie
---
drivers/target
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
This adds support in dm for the block PR read keys and read reservation
callouts.
Signed-off-by: Mike Christie
---
drivers/md/dm.c | 43 +++
1 file changed, 43 insertions(+)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index eace45a18d45..4abf640f1e7e
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
Reviewed-by: Chaitanya Kulkarni
---
drivers/scsi/sd.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff
BLK_STS_NEXUS is used for NVMe/SCSI reservation conflicts or in dasd's
case something similar. This renames BLK_STS_NEXUS so it better reflects
this.
Signed-off-by: Mike Christie
Cc: Stefan Haberland
Cc: Jan Hoeppner
---
block/blk-core.c | 2 +-
drivers/nvme/host/core.c | 2
-by: Mike Christie
Reviewed-by: Keith Busch
---
include/linux/nvme.h | 33 +
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 4fad4aa245fb..c8c504926462 100644
--- a/include/linux/nvme.h
+++ b/include/linux
Move the code that checks for multipath support and sends the pr command
to a new helper so it can be used by the reservation report support added
in the next patches.
Signed-off-by: Mike Christie
---
drivers/nvme/host/pr.c | 23 ++-
1 file changed, 14 insertions(+), 9
and
NVMe's report reservation commands. Those are overkill for dm/LIO and
READ_FULL_STATUS is sometimes broken for SCSI devices.
Signed-off-by: Mike Christie
---
include/linux/pr.h | 25 +
1 file changed, 25 insertions(+)
diff --git a/include/linux/pr.h b/include/linux/pr.h
function.
Signed-off-by: Mike Christie
---
Note for Chaitanya, Keith and Bart. For these patches where we convert
between block and nvme pr values, it seemed like Chaitanya and Keith
didn't have a strong preference. Bart had the suggestion to keep the
switch and drop the default so the compiler can
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. The next patch will
then also add a helper to go from the SCSI value to the block one for use
with PERSISTENT_RESERVE_IN commands.
Signed-off-by: Mike Christie
Reviewed
just returns the registered keys which is required by the SCSI
PR in READ KEYS command.
Signed-off-by: Mike Christie
---
drivers/nvme/host/pr.c | 65 ++
include/linux/nvme.h | 4 +++
2 files changed, 69 insertions(+)
diff --git a/drivers/nvme/host/pr.c b
On 12/3/22 9:10 AM, Xose Vazquez Perez wrote:
> On 11/30/22 05:56, bmarzins at redhat.com (Benjamin Marzinski) wrote:
>
>> The multpath-tools do not support the io-affinity path selector. We
>> always add a repeat count as the path argument. The io-affinity selector
>> doesn't take one. Instead
On 11/1/22 5:15 AM, Christoph Hellwig wrote:
> On Sun, Oct 30, 2022 at 06:05:35PM -0500, Mike Christie wrote:
>> The problem I hit is that in the ioctl code I then have to do:
>>
>> @@ -269,7 +270,14 @@ static int blkdev_pr_register(struct block_device *bdev,
>&
On 11/2/22 5:53 PM, Bart Van Assche wrote:
> On 10/26/22 16:19, Mike Christie wrote:
>> +struct pr_keys {
>> + u32 generation;
>> + u32 num_keys;
>> + u64 keys[];
>> +};
> Is my understanding correct that keys[] is treated as opaque data by t
On 11/2/22 5:47 PM, Bart Van Assche wrote:
> On 10/26/22 16:19, Mike Christie wrote:
>> +static inline enum scsi_pr_type block_pr_type_to_scsi(enum pr_type type)
>> +{
>> + switch (type) {
>> + case PR_WRITE_EXCLUSIVE:
>> + return SCSI
On 11/2/22 5:50 PM, Bart Van Assche wrote:
> On 10/26/22 16:19, Mike Christie wrote:
>> +struct pr_keys {
>> + u32 generation;
>> + u32 num_keys;
>> + u64 keys[];
>> +};
>> +
>> +struct pr_held_reservation {
>> + u64
On 11/1/22 12:43 AM, Chaitanya Kulkarni wrote:
>> +static inline enum scsi_pr_type block_pr_type_to_scsi(enum pr_type type)
>> +{
>> +switch (type) {
>> +case PR_WRITE_EXCLUSIVE:
>> +return SCSI_PR_WRITE_EXCLUSIVE;
>> +case PR_EXCLUSIVE_ACCESS:
>> +return
I_T nexus.
This patch adds the initial LIO callouts. The next patch will modify
iblock.
Signed-off-by: Mike Christie
Reviewed-by: Christoph Hellwig
---
drivers/target/target_core_pr.c | 60
include/target/target_core_backend.h | 5 +++
2 files changed, 65
On 10/27/22 10:18 AM, Keith Busch wrote:
> On Wed, Oct 26, 2022 at 06:19:36PM -0500, Mike Christie wrote:
>> For Reservation Report support we need to also convert from the NVMe spec
>> PR type back to the block PR definition. This moves us to an array, so in
>> the next pat
On 10/30/22 3:18 AM, Christoph Hellwig wrote:
>> +memset(resv, 0, sizeof(*resv));
>
> Is there any good reason this isn't done by the caller?
I will change it.
I think it was leftover from when I was experimenting with
some mulitpath support. It's not needed anymore.
--
dm-devel mailing
On 10/27/22 12:06 PM, Keith Busch wrote:
> On Wed, Oct 26, 2022 at 06:19:34PM -0500, Mike Christie wrote:
>> This patch moves the pr code to it's own file because I'm going to be
>> adding more functions and core.c is getting bigger.
>>
>> Signed-off-by: Mike Christie
&
and
NVMe's report reservation commands. Those are overkill for dm/LIO and
READ_FULL_STATUS is sometimes broken for SCSI devices.
Signed-off-by: Mike Christie
---
include/linux/pr.h | 24
1 file changed, 24 insertions(+)
diff --git a/include/linux/pr.h b/include/linux/pr.h
value if the error is > 0.
This patch just wires in the blk_status_t to the pr_ops callouts. The
next patches will then have the drivers pass up a blk_status_t.
Signed-off-by: Mike Christie
---
block/ioctl.c| 11 ++-
drivers/md/dm.c |
the registered keys which is required by the SCSI PR
in READ KEYS command.
Signed-off-by: Mike Christie
---
drivers/nvme/host/pr.c | 73 ++
include/linux/nvme.h | 4 +++
2 files changed, 77 insertions(+)
diff --git a/drivers/nvme/host/pr.c b/drivers/nvme
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 95a1ee3d314e..f7f806890c92
On 10/30/22 3:20 AM, Christoph Hellwig wrote:
> On Wed, Oct 26, 2022 at 06:19:38PM -0500, Mike Christie wrote:
>> To handle both cases and keep userspace compatibility, this patch adds a
>> blk_status_t arg to the pr_ops callouts. The lower levels will convert
>> their
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| 104 +++
include/scsi/scsi_block_pr.h | 20 +++
include/scsi/scsi_proto.h| 5 ++
3 files changed, 129
On 10/27/22 12:16 PM, Keith Busch wrote:
> On Thu, Oct 27, 2022 at 12:13:06PM -0500, michael.chris...@oracle.com wrote:
>> Oh wait there was also a
>>
>> 3. The pr_types come from userspace so if it passes us 10
>> and we just do:
>>
>> types[pr_type]
>>
>> then we would crash due an out of bounds
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
Reviewed-by: Christoph Hellwig
---
drivers/nvme/host/core.c | 14 --
1 file changed, 8 insertions(+), 6 deletions
the device/driver type and call a NVMe conversion function this
has NVMe do the conversion and return a blk_status_t which the upper
layer knows how to handle.
Signed-off-by: Mike Christie
---
drivers/nvme/host/core.c | 2 +-
drivers/nvme/host/nvme.h | 1 +
drivers/nvme/host/pr.c | 54
if needed.
Signed-off-by: Mike Christie
---
drivers/scsi/sd.c | 28 +++-
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8a39f25e4470..44d25194ff4e 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1696,7 +1696,8
-by: Mike Christie
---
include/linux/nvme.h | 33 +
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 050d7d0cd81b..3ab141d982d1 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -757,20 +757,37
This patch moves the pr code to it's own file because I'm going to be
adding more functions and core.c is getting bigger.
Signed-off-by: Mike Christie
---
drivers/nvme/host/Makefile | 2 +-
drivers/nvme/host/core.c | 120 ---
drivers/nvme/host/nvme.h | 2
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
On 10/30/22 3:17 AM, Christoph Hellwig wrote:
> On Wed, Oct 26, 2022 at 06:19:35PM -0500, Mike Christie wrote:
>> 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 reg
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. The next patch will
then also add a helper to go from the SCSI value to the block one for use
with PERSISTENT_RESERVE_IN commands.
Signed-off-by: Mike Christie
Reviewed
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
The following patches were built over Linus's tree and this patchset
https://lore.kernel.org/all/20221023030403.33845-24-michael.chris...@oracle.com/t/
which allows the SCSI layer passthrough users to control retries for
commands like PRs used in this patchset.
The patches in this thread allow
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
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
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
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
For Reservation Report support we need to also convert from the NVMe spec
PR type back to the block PR definition. This moves us to an array, so in
the next patch we can add another helper to do the conversion without
having to manage 2 switches.
Signed-off-by: Mike Christie
---
drivers/nvme
On 8/9/22 2:33 PM, Bart Van Assche wrote:
> On 8/9/22 11:08, Mike Christie wrote:
>> On 8/9/22 2:21 AM, Christoph Hellwig wrote:
>>> On Mon, Aug 08, 2022 at 07:04:11PM -0500, Mike Christie wrote:
>>>> To handle both cases, this patch adds a blk_status_t arg to the p
On 8/9/22 2:26 PM, Bart Van Assche wrote:
> On 8/8/22 17:04, Mike Christie wrote:
>> +static int sd_pr_in_command(struct block_device *bdev, u8 sa,
>> + unsigned char *data, int data_len)
>> +{
>> + struct scsi_disk *sdkp = scsi_disk(bdev->bd_dis
On 8/9/22 2:21 AM, Christoph Hellwig wrote:
> On Mon, Aug 08, 2022 at 07:04:11PM -0500, Mike Christie wrote:
>> To handle both cases, this patch adds a blk_status_t arg to the pr_ops
>> callouts. The lower levels will convert their device specific error to
>> the blk_status_t
1 - 100 of 196 matches
Mail list logo