From patchwork Mon Jan 12 18:35:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 5614101 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87AA99F3A0 for ; Mon, 12 Jan 2015 18:40:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C897420573 for ; Mon, 12 Jan 2015 18:40:41 +0000 (UTC) Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 298B120569 for ; Mon, 12 Jan 2015 18:40:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0CIa65b023823; Mon, 12 Jan 2015 13:36:06 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id t0CIa5Dk017162 for ; Mon, 12 Jan 2015 13:36:05 -0500 Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.21]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0CIa413029178; Mon, 12 Jan 2015 13:36:05 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0CIa0sT026569; Mon, 12 Jan 2015 13:36:00 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 12 Jan 2015 10:32:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,745,1413270000"; d="scan'208";a="660626697" Received: from kbusch-mobl4.amr.corp.intel.com (HELO [192.168.49.128]) ([10.232.112.26]) by fmsmga002.fm.intel.com with ESMTP; 12 Jan 2015 10:35:59 -0800 Date: Mon, 12 Jan 2015 18:35:59 +0000 (UTC) From: Keith Busch X-X-Sender: vmware@localhost.lm.intel.com To: Keith Busch In-Reply-To: Message-ID: References: <20150109194955.GA32641@redhat.com> <54B042FE.2000205@kernel.dk> <54B043FC.8000902@kernel.dk> <20150109214015.GA1032@redhat.com> <54B04E94.3010403@kernel.dk> <20150109222543.GA1190@redhat.com> <54B071DC.9000307@kernel.dk> <20150110014811.GA2384@redhat.com> <54B08779.2080705@kernel.dk> <20150110031057.GA2823@redhat.com> <54B3DE54.7090909@sandisk.com> <54B3EB4A.9090404@kernel.dk> <54B3F255.5080802@sandisk.com> <54B3F78D.2020704@kernel.dk> <54B3FE89.200@sandisk.com> <54B3FFAE.4070609@kernel.dk> <54B40E8A.6010005@kernel.dk> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 X-RedHat-Spam-Score: -7.311 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, SPF_PASS, T_RP_MATCHES_RCVD) 134.134.136.65 mga03.intel.com 134.134.136.65 mga03.intel.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.21 X-loop: dm-devel@redhat.com Cc: Jens Axboe , Mike Snitzer , Christoph Hellwig , device-mapper development , "Jun'ichi Nomura" , Bart Van Assche Subject: Re: [dm-devel] blk-mq request allocation stalls X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 12 Jan 2015, Keith Busch wrote: > Oh, let's look at "__blk_rq_prep_clone". dm calls that after > blk_get_request() for the blk-mq based multipath types and overrides the > destinations cmd_flags with the source's even though the source was not > allocated from a blk-mq based queue, much less a shared tag. Untested patch. This will also preserve the failfast cmd_flag dm-mpath set after allocating. --- -- -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel diff --git a/block/blk-core.c b/block/blk-core.c index 7e78931..6201090 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2895,7 +2895,10 @@ EXPORT_SYMBOL_GPL(blk_rq_unprep_clone); static void __blk_rq_prep_clone(struct request *dst, struct request *src) { dst->cpu = src->cpu; - dst->cmd_flags = (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE; + if (dst->q->mq_ops) + dst->cmd_flags |= (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE; + else + dst->cmd_flags = (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE; dst->cmd_type = src->cmd_type; dst->__sector = blk_rq_pos(src); dst->__data_len = blk_rq_bytes(src);