On 7/6/23 20:34, Damien Le Moal wrote:
Ming's point still stands I think: blk_queue_nomerges(q) is the first thing checked in elv_attempt_insert_merge(). So your patch should be a no-op and disabling merging through sysfs should still be effective. Why is your patch changing anything ? Moving blk_mq_sched_try_insert_merge() call to rq_mergeable(rq) inside elv_attempt_insert_merge() would also make a lot of sense I think. With that, blk_mq_sched_try_insert_merge() would be reduced to calling only elv_attempt_insert_merge(), which means that elv_attempt_insert_merge() could go away.
Let's drop this patch. Since this patch was developed against an older kernel version, let me check whether this patch is perhaps only needed for the kernel version it was developed against. Thanks, Bart.