[PATCH v3 04/19] scsi: Add support for block PR read keys/reservation
Chaitanya Kulkarni
chaitanyak at nvidia.com
Mon Oct 31 22:45:12 PDT 2022
> +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_EXCLUSIVE_REG_ONLY:
> + return PR_WRITE_EXCLUSIVE_REG_ONLY;
> + case SCSI_PR_EXCLUSIVE_ACCESS_REG_ONLY:
> + return PR_EXCLUSIVE_ACCESS_REG_ONLY;
> + case SCSI_PR_WRITE_EXCLUSIVE_ALL_REGS:
> + return PR_WRITE_EXCLUSIVE_ALL_REGS;
> + case SCSI_PR_EXCLUSIVE_ACCESS_ALL_REGS:
> + return PR_EXCLUSIVE_ACCESS_ALL_REGS;
> + default:
> + return 0;
> + }
> +}
> +
same here as previous comment, unless there is strong reason not to do
that ...
-ck
More information about the Linux-nvme
mailing list