Commit 9c1d9c2
committed
sd: Reject optimal transfer length smaller than page size
Eryu Guan reported that loading scsi_debug would fail. This turned out
to be caused by scsi_debug reporting an optimal I/O size of 32KB which
is smaller than the 64KB page size on the PowerPC system in question.
Add a check to ensure that we only use the device-reported OPTIMAL
TRANSFER LENGTH if it is bigger than or equal to the page cache size.
Reported-by: Eryu Guan <guaneryu@gmail.com>
Reported-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 1c69d3b commit 9c1d9c2
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2885 | 2885 | | |
2886 | 2886 | | |
2887 | 2887 | | |
2888 | | - | |
| 2888 | + | |
| 2889 | + | |
2889 | 2890 | | |
2890 | | - | |
2891 | | - | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
2892 | 2895 | | |
2893 | 2896 | | |
2894 | 2897 | | |
| |||
0 commit comments