On 2/23/22 04:58, Christoph Hellwig wrote:
In general most of the zeroing here should go away entirely. Right
now that code is a bit convolute due to the fake EH scsi command that
also uses scsi_init_command. Once that is sorted out (I've just pinged
Hannes for his series) scsi_init_command can be folded into
scsi_prepare_cmd and a lot more of this can be cleaned up.
Several SCSI LLDs rely on the SCSI core zeroing the driver-private data.
I'd be more than happy if the code for zeroing of driver-private data
would be pushed into the LLD drivers. This may require the introduction
of a new per-command flag since that zeroing should only happen if
scsi_queue_rq() decided to call scsi_prepare_cmd().
Bart.