Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751279AbeAPHxJ (ORCPT + 1 other); Tue, 16 Jan 2018 02:53:09 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:50092 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbeAPHxH (ORCPT ); Tue, 16 Jan 2018 02:53:07 -0500 Subject: Re: [Suspected-Phishing]Re: [PATCH V3 1/2] nvme: split resetting state into reset_prepate and resetting To: Max Gurtovoy , Sagi Grimberg , 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> From: "jianchao.wang" Message-ID: <26bce6af-b1d4-ea20-775e-193a0a6f9dd4@oracle.com> Date: Tue, 16 Jan 2018 15:52:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2d198b6a-47f4-8d2b-024d-76161f4b0f90@oracle.com> Content-Type: text/plain; charset=windows-1255 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8775 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801160116 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/16/2018 01:57 PM, jianchao.wang wrote: > Hi Max > > Thanks for your kindly comment. > > On 01/15/2018 09:36 PM, Max Gurtovoy wrote: >>>>> ????? case NVME_CTRL_RECONNECTING: >>>>> ????????? switch (old_state) { >>>>> ????????? case NVME_CTRL_LIVE: >>>>> ????????? case NVME_CTRL_RESETTING: >>>>> +??????? case NVME_CTRL_RESET_PREPARE: >> >> I forget to add that we shouldn't move from RESET_PREPARE to RECONNECTING (with my suggestion to rdma.c). >> Also need to consider adding another check in nvmf_check_init_req (/drivers/nvme/host/fabrics.h) for the new state. > > 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 > - initialization, set state to LIVE > > In nvme pci > - set state to RESET_PREPARE, queue reset_work > - clear/shutdown works, set state to RESETTING > - initialization, set state to LIVE Hi Christoph, Keith, Sagi Can you please comment on this ? Thanks in advance. Jianchao