On 16/04/2021 09:50, Ming Lei wrote:
My concern here is that it is a common pattern in LLDDs to overwrite the
initial shost member values between scsi_host_alloc() and scsi_add_host().
OK, then can we move the fix into beginning of scsi_add_host()?
I suppose that would be ok, but we don't do much sanitizing shost values at
that point. Apart from failing can_queue == 0.
.can_queue has been finalized in scsi_add_host(), since it will be used for
setting tagset, so .can_queue is reliable at that time.
I suppose failing can_queue < cmd_per_lun could also be added.
That will fail add host for scsi_debug simply.
But we still should have Doug's patch regardless.
Anyway, I'll prepare a patch, so we can discuss further on that thread.
Thanks,
John