From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbeADECY (ORCPT + 1 other); Wed, 3 Jan 2018 23:02:24 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:42666 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbeADECX (ORCPT ); Wed, 3 Jan 2018 23:02:23 -0500 Subject: Re: [PATCH] nvme: check ctrl.tagset before start ns scan To: Sagi Grimberg , keith.busch@intel.com, axboe@fb.com, hch@lst.de Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <1514916461-8696-1-git-send-email-jianchao.w.wang@oracle.com> From: "jianchao.wang" Message-ID: Date: Thu, 4 Jan 2018 12:01:54 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8763 signatures=668651 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-1801040053 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi sagi Many thanks for your kindly response. On 01/03/2018 05:37 PM, Sagi Grimberg wrote: > Hi Jianchao, > >> ctrl.tagset maybe NULL due to failure of io queue setup or blk-mq >> tagset allocation in nvme_reset_work. Then panic would come up. >> To fix this, just add ctrl.tagset check in nvme_scan_work. > > This came up before (and forgotten...) I think we should not > have state indicators other than ctrl->state. > > How about instead we add a new state NVME_CTRL_ADMIN_LIVE when we have > no I/O queues. > Yes, that's a good idea that add a new state NMVE_CTRL_ADMIN_LIVE to indicate only the admin queue live. On the other hand, add a sanity checking that whether ctrl->tagset is NULL is also necessary. :) Thanks Jianchao