On 06/15/2016 08:33 AM, Hannes Reinecke wrote:
And as I've mentioned before: what is the purpose of this check? 'max_sectors' and 'max_hw_sectors' are checked during request assembly, and those limits are not changed even after calling blk_recalc_rq_segments(). And if we go over any device-imposed restrictions we'll be getting an I/O error from the driver anyway. So why have it at all?
You don't know that to be the case. The driver asked for certain limits, the core MUST obey them. The driver should not need to check for these limits, outside of in a BUG_ON() like manner.
Especially as the system boots happily with this check removed...
That's the case for you, but you can't assume this to be the case in general.
There's a _lot_ of hand waving in this thread, Hannes. How do we reproduce this? We need to get this fixed for real, not just delete some check that triggers for you and that it just happens to work without. That's not how you fix problems.
-- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html