Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754339AbbKBQZn (ORCPT ); Mon, 2 Nov 2015 11:25:43 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:61096 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754320AbbKBQZj (ORCPT ); Mon, 2 Nov 2015 11:25:39 -0500 Subject: Re: [PATCH BUGFIX 2/3] null_blk: guarantee device restart in all irq modes To: Paolo Valente , =?UTF-8?Q?Matias_Bj=c3=b8rling?= , Arianna Avanzini References: <1446474673-2566-1-git-send-email-paolo.valente@unimore.it> <1446474673-2566-3-git-send-email-paolo.valente@unimore.it> CC: Akinobu Mita , "Luis R. Rodriguez" , Ming Lei , Mike Krinkin , From: Jens Axboe Message-ID: <56378E73.2040703@fb.com> Date: Mon, 2 Nov 2015 09:25:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1446474673-2566-3-git-send-email-paolo.valente@unimore.it> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-11-02_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1269 Lines: 29 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. -- Jens Axboe -- 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/