scsi: core: Add struct for args to execution functions
authorMike Christie <michael.christie@oracle.com>
Thu, 29 Dec 2022 19:01:40 +0000 (13:01 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 14 Jan 2023 02:34:08 +0000 (21:34 -0500)
commitd0949565811f0896c1c7e781ab2ad99d34273fdf
tree4c293053917526a62378e60b6f349fb157a429d6
parent1b929c02afd37871d5afb9d498426f83432e71c2
scsi: core: Add struct for args to execution functions

Move the SCSI execution functions to use a struct for passing in optional
args. This commit adds the new struct, temporarily converts scsi_execute()
and scsi_execute_req() ands a new helper, scsi_execute_cmd(), which takes
the scsi_exec_args struct.

There should be no change in behavior. We no longer allow users to pass in
any request->rq_flags value, but they were only passing in RQF_PM which we
do support by allowing users to pass in the BLK_MQ_REQ flags used by
blk_mq_alloc_request().

Subsequent commits will convert scsi_execute() and scsi_execute_req() users
to the new helpers then remove scsi_execute() and scsi_execute_req().

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c
include/scsi/scsi_device.h