Re: [PATCH] scsi: core: Cap initial sdev queue depth at shost.can_queue

From: John Garry
Date: Thu Apr 22 2021 - 12:38:38 EST

On 22/04/2021 02:38, Ming Lei wrote:
I would rather not change the values which are provided from the driver. I
would rather take the original values and try to use them in a sane way.

I have not seen other places where driver shost config values are modified
by the core code.

Hi Ming,

Wrt. .cmd_per_lun, I think it is safe to modify it into one correct
depth because almost all drivers are just producer of .cmd_per_lun. And
except for debug purpose, there are only three consumers of .cmd_per_lun
in scsi, and all are for scsi_change_queue_depth():


sg_ioctl_common() also looks to read it, but I can't imagine we could break that interface with either suggested change.

So I still prefer not to modify shost.cmd_per_lun, but if you feel strongly enough then I can look to make that change.