On 15/05/2024 06:29, Hannes Reinecke wrote:
I suspect that you would need to also change the PAGE_SIZE check in
__blk_bios_map_sg() also. However, I am not confident that the change
below is ok to begin with...
BTW, scsi_debug does use an insane max_segment_size of -1
Can you try with this patch?
It's scsi_debug, anyone can try it.
As for Luis' original issue, I did not see a proper explanation why the
crash occurred. The splitting code should consider max segment size
already, AFAICS. We seem to be slicing off less than LBS, which means
bytes = 0 after the rounddown, which crashes. why?
I think that all request_queue limits should really be double-checked
for this LBS on NVMe. The virtual_boundary_mask is still 4K, which
should be ok.