]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: storvsc: Fix max_outstanding_req_per_channel for Win8 and newer
authorAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Thu, 17 Dec 2020 20:33:19 +0000 (21:33 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 Jan 2021 04:15:00 +0000 (23:15 -0500)
commit28f6a8e76308460a2249c6aeb9558782c5a2ab63
tree0345e05428e486b7be7f59315a54b3d24e5fb1fa
parentbf90aee9fe3380b483751c7c11757897bbb8a27f
scsi: storvsc: Fix max_outstanding_req_per_channel for Win8 and newer

Current code overestimates the value of max_outstanding_req_per_channel for
Win8 and newer hosts, since vmscsi_size_delta is set to the initial value
of sizeof(vmscsi_win8_extension) rather than zero.  This may lead to wrong
decisions when using ring_avail_percent_lowater equals to zero.  The
estimate of max_outstanding_req_per_channel is 'exact' for Win7 and older
hosts.  A better choice, keeping the algorithm for the estimation simple,
is to err the other way around, i.e., to underestimate for Win7 and older
but to use the exact value for Win8 and newer.

Link: https://lore.kernel.org/r/20201217203321.4539-2-parri.andrea@gmail.com
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Suggested-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/storvsc_drv.c