> +static inline enum pr_type scsi_pr_type_to_block(enum scsi_pr_type type)
> +{
> + switch (type) {
> + case SCSI_PR_WRITE_EXCLUSIVE:
> + return PR_WRITE_EXCLUSIVE;
> + case SCSI_PR_EXCLUSIVE_ACCESS:
> + return PR_EXCLUSIVE_ACCESS;
> + case SCSI_PR_WRITE_E
On 10/26/22 16:19, Mike Christie wrote:
> 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 command
On 10/26/22 16:19, Mike Christie wrote:
> 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 ++--
>
Reviewed-by: Chaitanya Kulkarni
On 10/26/22 16:19, Mike Christie wrote:
> 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: Chaitanya Kulkarni
-ck
On 10/26/22 16:19, 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
> ---
>
Thanks a lot for doing this ...
Reviewed-by: Chaitanya Kulkarni
-ck
--
dm-devel maili