Thread (9 messages) 9 messages, 6 authors, 2016-06-17

Re: block: don't check request size in blk_cloned_rq_check_limits()

From: Jens Axboe <axboe@kernel.dk>
Date: 2016-06-15 10:03:40
Also in: linux-scsi

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help