Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp315912pxv; Thu, 8 Jul 2021 03:15:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsmE1YCrN3PqDJM9rhFQIOhetMzpeQhdLg+TKzNNCAhA4iBF7IeDfKyw7o/7zPUE7ZCDCM X-Received: by 2002:a02:3506:: with SMTP id k6mr26420345jaa.39.1625739309812; Thu, 08 Jul 2021 03:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625739309; cv=none; d=google.com; s=arc-20160816; b=tS7YGO6vhEE3yua12U+/NJSg/K4a1q81D2jnjqOVkFguiCuDIzGoyq1cPOB1thpCLN QvNU8qaxwzdS3QVTgrcUp6PZg8+5vkxTaHTMz+AEBt4QbzAcFNHWqOk/RhNvAug3mJB1 Uz6SiV6Oq8k47ISDhWKoRYySxSZMbLP2rLpvZscJOCu1hNb2Py9+vf+3tpNuMEgNC3KD 0c8totxgECNB3gSLjjbaZu3D1GZbzBpQt6ixk8aD7UR4yXJqe11uQdm/fNrJq5MYkou0 th+2MhVitXGilIkKXFOtnQBCclKZhf7u7cAJQJI5BsbVjb0P39H77JiRSQJPzaY6mH6p S+ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature; bh=L9fG/9l95sDD5upgyztRxQDi3j6L5c0fkrT4qgdJKZU=; b=BuHL7IbzPoHQN5EXF04tPVan3yM64WMOvA9LsvNA+AwhBE4zRImBLbuiXtmUP+RENo BB5KG915DnF7iHUmHJx7o2vxXCOk9yfi2nnJI7sHS2+GwgT9pVYPPXl4eBFeHalZR25C vP2qc+PZts+/gOZtIuU5mGcRKcgRTxYEoUhymM5SBjhQahjSPoHNbUwEDv/S9TqDLKBs go4WEMnLyRqdNGOBotUgjN9f294QZTzeXNNj7NhR6o5h0rheVDq9xBR4jEG5aZ1EDRL0 oyXvwtdiBPtiEQoD8hJ7lvZF++fFIHap/Zh/+8s9CJ4qQxUg3fwK9AIEP5ZNjGeIpQ4Q xVDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="Uo1LL/bh"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si1682805ioa.74.2021.07.08.03.14.57; Thu, 08 Jul 2021 03:15:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="Uo1LL/bh"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231417AbhGHKQy (ORCPT + 99 others); Thu, 8 Jul 2021 06:16:54 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:43346 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231332AbhGHKQx (ORCPT ); Thu, 8 Jul 2021 06:16:53 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9E7B12235F; Thu, 8 Jul 2021 10:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625739251; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L9fG/9l95sDD5upgyztRxQDi3j6L5c0fkrT4qgdJKZU=; b=Uo1LL/bhDWwVf9ZzX35a1SvIKiZ6vvxHTyHpxaHdDdVcvtbh99hK1UsTsVSk5Dy5/oK0Qh Htk/1Vrlpj/d075LsCT7e7x/xovt8GwO8Lf8HSZ0BXY5GrhYY6jaQrN+Xs1O8jY2a9DUR+ yQvc4EBHdwHqqwPOuMshDlP8o7aThdE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625739251; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L9fG/9l95sDD5upgyztRxQDi3j6L5c0fkrT4qgdJKZU=; b=kumXPEHTRHLuqo/viCd1DZo3N8g0e9KN8ULaqxBMX94BUkdRAXpneRR+qxoV4acQEdlI0x 8V0tq38EJfq5L6BQ== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 75DB81338E; Thu, 8 Jul 2021 10:14:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id qSCpG/PP5mC0MwAAGKfGzw (envelope-from ); Thu, 08 Jul 2021 10:14:11 +0000 Subject: Re: [PATCH v2 5/5] nvme-fc: Freeze queues before destroying them To: Daniel Wagner , linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, James Smart , Keith Busch , Jens Axboe , Ming Lei , Sagi Grimberg References: <20210708092755.15660-1-dwagner@suse.de> <20210708092755.15660-6-dwagner@suse.de> From: Hannes Reinecke Message-ID: <8edf09e2-52c1-5b96-6d45-ec210ffc33e1@suse.de> Date: Thu, 8 Jul 2021 12:14:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210708092755.15660-6-dwagner@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/8/21 11:27 AM, Daniel Wagner wrote: > nvme_wait_freeze_timeout() in nvme_fc_recreate_io_queues() needs to be > paired with a nvme_start_freeze(). Without freezing first we will always > timeout in nvme_wait_freeze_timeout(). > > Note there is a similiar fix for RDMA 9f98772ba307 ("nvme-rdma: fix > controller reset hang during traffic") which happens to follow the PCI > strategy how to handle resetting the queues. > > Signed-off-by: Daniel Wagner > --- > drivers/nvme/host/fc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c > index 8e1fc3796735..a38b01485939 100644 > --- a/drivers/nvme/host/fc.c > +++ b/drivers/nvme/host/fc.c > @@ -3249,6 +3249,7 @@ nvme_fc_delete_association(struct nvme_fc_ctrl *ctrl) > nvme_fc_xmt_ls_rsp(disls); > > if (ctrl->ctrl.tagset) { > + nvme_start_freeze(&ctrl->ctrl); > nvme_fc_delete_hw_io_queues(ctrl); > nvme_fc_free_io_queues(ctrl); > } > Please add a comment here about the pairing. We've missed it once, so we should make it clear why it has to be placed here. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer