scsi: target: Pass struct target_opcode_descriptor to enabled
authorMike Christie <michael.christie@oracle.com>
Fri, 7 Apr 2023 20:05:49 +0000 (15:05 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Apr 2023 01:55:36 +0000 (21:55 -0400)
commitd9b3275bddd58f1e61171483c3625b5bd0841b71
tree7073a56e2161efb1d3065275c0e1732a490ded06
parent53062ace0b6e47f17cae2db453858c8a369a2fe4
scsi: target: Pass struct target_opcode_descriptor to enabled

The iblock pr_ops support does not support commands that require port or
I_T Nexus info. This adds a struct target_opcode_descriptor as an argument
to the enabled callout so we can still have the common tcm_is_pr_enabled
and tcm_is_scsi2_reservations_enabled functions and also determine if the
command is supported based on the command and service action and device
settings.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230407200551.12660-17-michael.christie@oracle.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_spc.c
include/target/target_core_base.h