Re: [PATCH] scsi: Let scsi_execute_cmd() mark args->sshdr as invalid
From: Mike Christie
Date: Tue May 23 2023 - 11:05:04 EST
On 5/20/23 8:19 PM, Martin K. Petersen wrote:
> As I alluded to in the tracing thread, I'd like to see SK/ASC/ASCQ being
> generally available in the scsi_cmnd results instead of all this sense
Do you mean you just want a scsi_sense_hdr struct in the scsi_cmnd?
If so, I can do this when I resend the scsi retries patches since I have
to touch every scsi_execute_cmd user and test them (at least what I can
because I couldn't test things like scsi_dh_hp/rdac).
For the scsi_execute_cmd issue would we just do:
scsi_mq_init_request()
{
cmd->sshdr = { 0 };
....
}
scsi_execute_cmd()
blk_execute_rq()
if (sshdr)
memcpy(sshdr, &scmd->sshdr, sizeof(*sshdr);
?
> buffer and sense header micromanagement in every caller. That's a pretty
> heavy lift, though.