On 8/12/21 4:58 AM, Martin K. Petersen wrote:
Bart,
Cf the previous patch; we really should introduce a helper to get
the tag from a SCSI command.
Is this something that you plan to work on or do you perhaps expect me
to introduce such a helper?
I agree that getting the tag is a common operation and I had the same
thought as Hannes when I reviewed the patches.
Adding a dedicated wrapper would result in the diff below. However,
after having gone through this exercise, I'm not sure it's worth the
additional churn...
Thoughts?
Go for it.
I'm not particularly keen on the 'scsi_cmd_to_rq(cmd)->tag' construct,
as this implies that 'scsi_cmd_to_rq()' has to be a define, not a function.
Having a wrapper for scsi_cmd_to_tag() resolves that.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer