Re: [dm-devel] [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request

2023-02-17 Thread Christoph Hellwig
On Thu, Feb 16, 2023 at 12:27:02PM -0700, Uday Shankar wrote: > * Description: > *@rq may have been made based on weaker limitations of upper-level queues > *in request stacking drivers, and it may violate the limitation of @q. > *Since the block layer and the underlying device

Re: [dm-devel] [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request

2023-02-16 Thread Uday Shankar
On Wed, Feb 15, 2023 at 10:09:36PM -0800, Christoph Hellwig wrote: > I'd just remove the debug check entirely Older kernels have these checks in a separate function called blk_cloned_rq_check_limits, which carries the following comment: /** * blk_cloned_rq_check_limits - Helper function to

Re: [dm-devel] [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request

2023-02-16 Thread kernel test robot
Hi Uday, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 6bea9ac7c6481c09eb2b61d7cd844fc64a526e3e] url: https://github.com/intel-lab-lkp/linux/commits/Uday-Shankar/blk-mq-enforce-op-specific-segment-limits-in-blk_insert_cloned_request/20230216-041718 base:

Re: [dm-devel] [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request

2023-02-15 Thread Christoph Hellwig
On Wed, Feb 15, 2023 at 01:15:08PM -0700, Uday Shankar wrote: > The block layer might merge together discard requests up until the > max_discard_segments limit is hit, but blk_insert_cloned_request checks > the segment count against max_segments regardless of the req op. This > can result in

[dm-devel] [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request

2023-02-15 Thread Uday Shankar
The block layer might merge together discard requests up until the max_discard_segments limit is hit, but blk_insert_cloned_request checks the segment count against max_segments regardless of the req op. This can result in errors like the following when discards are issued through a DM device and