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

2023-02-28 Thread Uday Shankar
for everything else. Signed-off-by: Uday Shankar --- Changes v1-v2: - Fixed format specifier type mismatch Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302162040.fai25ul2-...@intel.com/ Changes v2-v3: - Refactor: move pre-existing blk_rq_get_max_segments to blk.h and

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

2023-02-23 Thread Uday Shankar
On Wed, Feb 22, 2023 at 12:16:02PM -0700, Keith Busch wrote: > On Wed, Feb 22, 2023 at 11:52:25AM -0700, Uday Shankar wrote: > > static inline unsigned int blk_rq_get_max_segments(struct request *rq) > > { > > - if (req_op(rq) == REQ_OP_DISCARD) &

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

2023-02-22 Thread Uday Shankar
for everything else. Signed-off-by: Uday Shankar --- Changes since v1: - Fixed format specifier type mismatch Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302162040.fai25ul2-...@intel.com/ block/blk-merge.c | 4 +--- block/blk-mq.c| 7 --- block/blk.h

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

2023-02-17 Thread Uday Shankar
> Much easier to address a bug in a driver when seeing this message than > figuring it out after more elaborate hunting. Not seeing the downside > of preserving/fixing given it is a quick limit check. *shrug* I tend to agree - considering the check has been here for a while, I don't know if lower

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 check

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

2023-02-15 Thread Uday Shankar
for everything else. Signed-off-by: Uday Shankar --- block/blk-merge.c | 4 +--- block/blk-mq.c| 5 +++-- block/blk.h | 8 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index b7c193d67..7f663c2d3 100644 --- a/block/blk-merg