Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbbKCJCx (ORCPT ); Tue, 3 Nov 2015 04:02:53 -0500 Received: from smtp26.sms.unimo.it ([155.185.44.26]:50471 "EHLO smtp26.sms.unimo.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbbKCJCq convert rfc822-to-8bit (ORCPT ); Tue, 3 Nov 2015 04:02:46 -0500 Subject: Re: [PATCH BUGFIX 2/3] null_blk: guarantee device restart in all irq modes Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=windows-1252 From: Paolo Valente In-Reply-To: <56378E73.2040703@fb.com> Date: Tue, 3 Nov 2015 10:02:28 +0100 Cc: =?windows-1252?Q?Matias_Bj=F8rling?= , Arianna Avanzini , Akinobu Mita , "Luis R. Rodriguez" , Ming Lei , Mike Krinkin , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <3A304788-D796-4F7F-87A6-1AD1A3448598@unimore.it> References: <1446474673-2566-1-git-send-email-paolo.valente@unimore.it> <1446474673-2566-3-git-send-email-paolo.valente@unimore.it> <56378E73.2040703@fb.com> To: Jens Axboe X-Mailer: Apple Mail (2.1878.6) UNIMORE-X-SA-Score: -2.9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 45 Il giorno 02/nov/2015, alle ore 17:25, Jens Axboe ha scritto: > On 11/02/2015 07:31 AM, Paolo Valente wrote: >> From: Arianna Avanzini >> >> In single-queue (block layer) mode,the function null_rq_prep_fn stops >> the device if alloc_cmd fails. Then, once stopped, the device must be >> restarted on the next command completion, so that the request(s) for >> which alloc_cmd failed can be requeued. Otherwise the device hangs. >> >> Unfortunately, device restart is currently performed only for delayed >> completions, i.e., in irqmode==2. This fact causes hangs, for the >> above reasons, with the other irqmodes in combination with single-queue >> block layer. >> >> This commits addresses this issue by making sure that, if stopped, the >> device is properly restarted for all irqmodes on completions. > > This looks good. I did a double take at the removal of the q->mq_ops check before blk_queue_stopped(), but we can't get there in MQ mode. Perhaps a comment would be warranted for that, the ->mq_ops check served as a bit of documentation for that before. > Honestly, I removed that additional check by mistake. I will put it back in the next version of this patchset, once (and if) I have the green light on patch 1/3. Thanks, Paolo > -- > Jens Axboe > -- Paolo Valente Algogroup Dipartimento di Fisica, Informatica e Matematica Via Campi, 213/B 41125 Modena - Italy homepage: http://algogroup.unimore.it/people/paolo/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/