On 2/19/19 1:02 PM, Sreekanth Reddy wrote:
Use driver's scsiio lookup table to track outstanding IOs at driver level, Have done following changes in this patch, * Allocated & initialized scsi_lookup table of type (struct scsiio_tracker) and of depth host's can_queue at driver load time and it will be deallocated at driver unload time. * Once scmd is receieved, driver will take scsiio_tracker at entry corresponding to scmd's tag value from scsi_lookup table. Then this scsiio_tracker entry is initialized with proper smid, scmd, cb_idx etc. And this scsiio_tracker entry contents are cleared before driver calling scsi_done callback function. * scmd's host_scribble variable is used to save the corresponding scsiio_tracker address, later at any time driver can easily retrieve the scmd's corresponding scsiio_tacker using this host_scribble variable. * Whenever driver wants to get the outstanding IOs at the driver level then driver can go through this scsi_lookup table and if it observe any entry with non-null scmd then it means that scmd is outstanding at the driver level. Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> ---
What is the reason for this change? The description only states _what_ you are doing, not why. Care to elaborate? Cheers, Hannes