From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756609AbcFHLyi (ORCPT ); Wed, 8 Jun 2016 07:54:38 -0400 Received: from verein.lst.de ([213.95.11.211]:49268 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbcFHLyh (ORCPT ); Wed, 8 Jun 2016 07:54:37 -0400 Date: Wed, 8 Jun 2016 13:54:34 +0200 From: Christoph Hellwig To: Jens Axboe Cc: Christoph Hellwig , keith.busch@intel.com, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Ming Lin Subject: Re: [PATCH 1/8] blk-mq: add blk_mq_alloc_request_hctx Message-ID: <20160608115434.GA30912@lst.de> References: <1465248119-17875-1-git-send-email-hch@lst.de> <1465248119-17875-2-git-send-email-hch@lst.de> <5757A3D2.1030003@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5757A3D2.1030003@kernel.dk> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 07, 2016 at 10:49:22PM -0600, Jens Axboe wrote: > Why are we duplicating this code here? If NOWAIT isn't set, then we'll > always return a request. bt_get() will run the queue for us, if it needs > to. blk_mq_alloc_request() does this too, and I'm guessing that code was > just copied. I'll fix that up. Looks like this should just be: The generic code is a bit of a mess as it does the nowait optimization in two different cases, I'll send you a separate cleanup patch for that.