OSDN Git Service

scsi: add a scsi_alloc_request helper
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Oct 2021 06:06:05 +0000 (08:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 22 Oct 2021 14:33:57 +0000 (08:33 -0600)
commit68ec3b819a5d600a4ede8b596761dccac9f39ebc
tree3c5e400ee170381870fd834cada2f60c5d795302
parent237ea1602fb4cd14cd31b745a56fd0639c58eea3
scsi: add a scsi_alloc_request helper

Add a new helper that calls blk_get_request and initializes the
scsi_request to avoid the indirect call through ->.initialize_rq_fn.

Note that this makes the pktcdvd driver depend on the SCSI core, but
given that only SCSI devices support SCSI passthrough requests that
is not a functional change.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20211021060607.264371-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/Kconfig
drivers/block/pktcdvd.c
drivers/scsi/scsi_bsg.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_ioctl.c
drivers/scsi/scsi_lib.c
drivers/scsi/sg.c
drivers/scsi/sr.c
drivers/scsi/st.c
drivers/target/target_core_pscsi.c
include/scsi/scsi_cmnd.h