From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756038Ab2BBUfV (ORCPT ); Thu, 2 Feb 2012 15:35:21 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:64891 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755014Ab2BBUfS (ORCPT ); Thu, 2 Feb 2012 15:35:18 -0500 Date: Thu, 2 Feb 2012 12:35:13 -0800 From: Tejun Heo To: Vivek Goyal Cc: axboe@kernel.dk, ctalbott@google.com, rni@google.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/11] block: relocate elevator initialized test from blk_cleanup_queue() to blk_drain_queue() Message-ID: <20120202203513.GH19837@google.com> References: <1328131156-13290-1-git-send-email-tj@kernel.org> <1328131156-13290-3-git-send-email-tj@kernel.org> <20120202202042.GC1723@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120202202042.GC1723@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, Feb 02, 2012 at 03:20:42PM -0500, Vivek Goyal wrote: > > @@ -359,6 +359,13 @@ EXPORT_SYMBOL(blk_put_queue); > > */ > > void blk_drain_queue(struct request_queue *q, bool drain_all) > > { > > + /* > > + * The caller might be trying to tear down @q before its elevator > > + * is initialized, in which case we don't want to call into it. > > + */ > > + if (!q->elevator) > > + return; > > + > > Shouldn't blk_throtl_drain() be called irrespective of the fact whether > elevator is initilialized or not? On bio based drivers, there will be > no elevator but bios can still be throttled. Hmmm... probably, but doesn't that mean the code is already broken for bio based drivers using throtl? Thanks. -- tejun