Skip to content

Commit 4c76114

Browse files
Mahesh Rajashekharamartinkpetersen
authored andcommitted
scsi: smartpqi: correct stream detection
Correct stream detection by initializing the structure pqi_scsi_dev_raid_map_data to 0s. When the OS issues SCSI READ commands, the driver erroneously considers them as SCSI WRITES. If they are identified as sequential IOs, the driver then submits those requests via the RAID path instead of the AIO path. The 'is_write' flag might be set for SCSI READ commands also. The driver may interpret SCSI READ commands as SCSI WRITE commands, resulting in IOs being submitted through the RAID path. Note: This does not cause data corruption. Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Signed-off-by: Mahesh Rajashekhara <[email protected]> Signed-off-by: Don Brace <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 058311b commit 4c76114

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/smartpqi/smartpqi_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5942,7 +5942,7 @@ static bool pqi_is_parity_write_stream(struct pqi_ctrl_info *ctrl_info,
59425942
int rc;
59435943
struct pqi_scsi_dev *device;
59445944
struct pqi_stream_data *pqi_stream_data;
5945-
struct pqi_scsi_dev_raid_map_data rmd;
5945+
struct pqi_scsi_dev_raid_map_data rmd = { 0 };
59465946

59475947
if (!ctrl_info->enable_stream_detection)
59485948
return false;

0 commit comments

Comments
 (0)