From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754713AbeAQVIm (ORCPT ); Wed, 17 Jan 2018 16:08:42 -0500 Received: from mail-qt0-f182.google.com ([209.85.216.182]:43627 "EHLO mail-qt0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753572AbeAQVIi (ORCPT ); Wed, 17 Jan 2018 16:08:38 -0500 X-Google-Smtp-Source: ACJfBoup+zmpsIWdcMxz7a1LXLIzSXaQr2N74L9sprLYjxzauIW6/CZAGCJa4Te8ZTah4kQBLVYNtQ== Subject: Re: [Suspected-Phishing]Re: [PATCH V3 1/2] nvme: split resetting state into reset_prepate and resetting To: Sagi Grimberg , "jianchao.wang" , Max Gurtovoy , keith.busch@intel.com, axboe@fb.com, hch@lst.de Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org References: <1515647268-1717-1-git-send-email-jianchao.w.wang@oracle.com> <1515647268-1717-2-git-send-email-jianchao.w.wang@oracle.com> <1c001532-234f-bc56-7fb4-bcd08142842e@mellanox.com> <2d198b6a-47f4-8d2b-024d-76161f4b0f90@oracle.com> <538cb758-a343-a823-3a50-993a541414b3@grimberg.me> From: James Smart Message-ID: <29941689-77ea-5c97-641a-fd5b8d1a6c82@broadcom.com> Date: Wed, 17 Jan 2018 13:08:35 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <538cb758-a343-a823-3a50-993a541414b3@grimberg.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/17/2018 2:37 AM, Sagi Grimberg wrote: > >> After Sagi's nvme-rdma: fix concurrent reset and reconnect, the rdma >> ctrl state is changed to RECONNECTING state >> after some clearing and shutdown work, then some initializing >> procedure,  no matter reset work path or error recovery path. >> The fc reset work also does the same thing. >> So if we define the range that RESET_PREPARE includes scheduling gap >> and disable and clear work, RESETTING includes initializing >> procedure,  RECONNECTING is very similar with RESETTING. >> >> Maybe we could do like this; >> In nvme fc/rdma >> - set state to RESET_PREPARE, queue reset_work/err_work >> - clear/shutdown works, set state to RECONNECTING > > Should be fine. > >> In nvme pci >> - set state to RESET_PREPARE, queue reset_work >> - clear/shutdown works, set state to RESETTING >> - initialization, set state to LIVE > > Given that we split reset state and we have a clear symmetry between > the transports, do we want to maybe come up with a unique state that is > coherent across all transports? > > Maybe we rename them to NVME_CTRL_SHUTTING_DOWN and > NVME_CTRL_ESTABLISHING? I'm open for better names.. I'm leaning toward this latter suggestion - we need to define the states and the actions they take. It seems to me, that RESETTING became the "init controller" part in Jainchao's model. So maybe it's not the shutting down that needs a new state, but rather the REINIT part. -- james