From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752855AbbKZIN2 (ORCPT ); Thu, 26 Nov 2015 03:13:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:43272 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbbKZIN1 (ORCPT ); Thu, 26 Nov 2015 03:13:27 -0500 Message-ID: <5656BF25.3000407@suse.de> Date: Thu, 26 Nov 2015 09:13:25 +0100 From: Hannes Reinecke User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Jens Axboe CC: Ming Lei , Christoph Hellwig , "Martin K. Petersen" , "linux-scsi@vger.kernel.org" , Linux Kernel Subject: QUEUE_FLAG_NO_SG_MERGE and non-block-mq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, while investigating the crash in scsi_lib.c I found a rather curious behaviour for QUEUE_FLAG_NO_SG_MERGE. While the flag is evaluated in blk_recalc_rq_segments and blk_recount_segments (resulting in nr_phys_segments being computed based on that flag) it is completely ignored during blk_rq_map_sg() or the actual merging itself. This typically shouldn't be an issue, seeing that with QUEUE_FLAG_NO_SG_MERGE nr_phys_segments will always be larger than the actual segment count. However, it still makes me wonder: What is the point of having a QUEUE_FLAG_NO_SG_MERGE which doesn't work as advertised? Or, to be precise, which only works for blk-mq? Should we make it work for non-block-mq, too? Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)