Commit 2691277
Ewan D. Milne
scsi: core: Clear driver private data when retrying request
JIRA: https://issues.redhat.com/browse/RHEL-86156
Upstream Status: From upstream linux mainline
Conflicts: Merge differences due to various commits not present in RHEL 9
which only affected the portion of this patch that removed the
memset() of the per-cmd private drivate data from the function
scsi_init_command() -- RHEL 9 still avoids zeroing the scsi_req
but this does not affect the memset() added to scsi_queue_rq().
After commit 1bad6c4 ("scsi: zero per-cmd private driver data for each
MQ I/O"), the xen-scsifront/virtio_scsi/snic drivers all removed code that
explicitly zeroed driver-private command data.
In combination with commit 464a00c ("scsi: core: Kill DRIVER_SENSE"),
after virtio_scsi performs a capacity expansion, the first request will
return a unit attention to indicate that the capacity has changed. And then
the original command is retried. As driver-private command data was not
cleared, the request would return UA again and eventually time out and fail.
Zero driver-private command data when a request is retried.
Fixes: f7de50d ("scsi: xen-scsifront: Remove code that zeroes driver-private command data")
Fixes: c2bb873 ("scsi: virtio_scsi: Remove code that zeroes driver-private command data")
Fixes: c3006a9 ("scsi: snic: Remove code that zeroes driver-private command data")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20250217021628.2929248-1-yebin@huaweicloud.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit dce5c4a)
Signed-off-by: Ewan D. Milne <emilne@redhat.com>1 parent 8c8174d commit 2691277
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1295 | 1295 | | |
1296 | 1296 | | |
1297 | 1297 | | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
| 1298 | + | |
1301 | 1299 | | |
1302 | 1300 | | |
1303 | | - | |
1304 | | - | |
1305 | 1301 | | |
1306 | 1302 | | |
1307 | 1303 | | |
| |||
1867 | 1863 | | |
1868 | 1864 | | |
1869 | 1865 | | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
1870 | 1873 | | |
1871 | 1874 | | |
1872 | 1875 | | |
| |||
0 commit comments