On 10/11/2022 19:26, Mike Christie wrote:
I'll change the types in another patchset,
Oh wait, I could probably handle your comments in this set if we
wanted to.
hmmm...maybe it's better to be done in another series, as you might get
bogged down here with other comments ...
scsi_execute could already take the block layer flags, so we already
are doing that type of thing so when I was thinking the scsi_execute
interface should be less block layer'y I was wrong. So, I could convert
the users to use the REQ_OP_DRV instead of DMA values when I do the args
conversion since we normally do just pass it in the directly (vs libata
where we do some extra work).
Further to that, I do wonder why we even need a separate dma_dir flag at
all.
We already pass a blk_opt_t arg in flags, so why have a separate conduit
to set REQ_OP_DRV_{IN/OUT}? A couple of other observations:
a. why do we manually set req->cmd_flags from flags instead of passing
flags directly to scsi_alloc_request()
b. why pass a req_flags_t instead of a blk_mq_req_flags_t - as I see,
rq_flags arg is only ever set to RQF_PM or 0, so no need for a conversion.
One thing that is weird to me is that scsi_execute_req is the more scsi'ish
interface. I would have thought since it took the req flag since it has the
req naming in it.
I don't care either way.
Thanks,
John