On Fri, Nov 11, 2022 at 12:07:26PM +0000, John Garry wrote: > 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. Mostly historic I guess. But to me the fact that the blk_opf_t is passed is a good argument for only passing that and not an extra DMA direction. rq_flags is a mess - the flags to the request allocator are different from those at runtime, and the PM case needs both. We'll eventually need to clean this up in the block layer, but this is not the time.