]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: sd: Quiesce warning if device does not report optimal I/O size
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Mar 2019 16:11:52 +0000 (12:11 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Mar 2019 01:21:38 +0000 (21:21 -0400)
commit16f2eee60fb33b8d89ce79a761e91da7f7f10ef2
tree608d191867c9dbaa788f5578c8ae8dc259df4887
parent26cf570025b65c50c209c75b0259e7d0df68eaac
scsi: sd: Quiesce warning if device does not report optimal I/O size

Commit 3b0a40f6315f ("scsi: sd: Optimal I/O size should be a multiple
of physical block size") split one conditional into several separate
statements in an effort to provide more accurate warning messages when
a device reports a nonsensical value. However, this reorganization
accidentally dropped the precondition of the reported value being
larger than zero. This lead to a warning getting emitted on devices
that do not report an optimal I/O size at all.

Remain silent if a device does not report an optimal I/O size.

Fixes: 3b0a40f6315f ("scsi: sd: Optimal I/O size should be a multiple of physical block size")
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: <stable@vger.kernel.org>
Reported-by: Hussam Al-Tayeb <ht990332@gmx.com>
Tested-by: Hussam Al-Tayeb <ht990332@gmx.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c