On 2019/02/14 12:22, Martin K. Petersen wrote: > > Damien, > >> + buflen = min(queue_max_sectors(disk->queue) << 9, >> + roundup((nrz + 1) * 64, 512)); > > Shouldn't this be queue_max_hw_sectors()? > > max_sectors is the soft limit for filesystem reads and writes. > > max_hw_sectors is the per-command maximum data transfer supported by the > controller. Indeed, it should be. Checking again with the problematic HBA (smartpqi), max_sectors_kb is 1024 and so is max_hw_sectors_kb. Interestingly, with this HBA, max_sectors_kb cannot be changed to a value larger than 1024, which seems weird since max_segments is 257 and max_segment_size is 64K. I guess the driver wants to guarantee that any I/O can always be mapped with fragmented 4K pages. On most other HBAs I have, max_sectors_kb default to 1280, that is, BLK_DEF_MAX_SECTORS and max_hw_sectors_kb is several megabytes (16 for SAS and 32 for SATA), which is plenty for even very large blkdev_report_zones() requests. But the value given with smartpqi is too small for even the report zones calls from blk_revalidate_zones(). Updating and resending. Thanks ! -- Damien Le Moal Western Digital Research