From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751105AbdEaQKE (ORCPT ); Wed, 31 May 2017 12:10:04 -0400 Received: from mga14.intel.com ([192.55.52.115]:44750 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912AbdEaQKC (ORCPT ); Wed, 31 May 2017 12:10:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,275,1493708400"; d="scan'208";a="1176594427" Date: Wed, 31 May 2017 12:17:56 -0400 From: Keith Busch To: Sagi Grimberg Cc: Rakesh Pandit , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig Subject: Re: [PATCH V2 1/1] nvme: fix multiple ctrl removal scheduling Message-ID: <20170531161756.GD2845@localhost.localdomain> References: <20170524142623.GA27721@dhcp-216.srv.tuxera.com> <20170526100613.GE24894@localhost.localdomain> <29f66b96-0629-177a-be54-dbd638bf0f49@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29f66b96-0629-177a-be54-dbd638bf0f49@grimberg.me> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 30, 2017 at 02:58:06PM +0300, Sagi Grimberg wrote: > > So, the reason the state is changed when the work is running rather than > > queueing is for the window when the state may be set to NVME_CTRL_DELETING, > > and we don't want the reset work to proceed in that case. > > > > What do you think about adding a new state, like NVME_CTRL_SCHED_RESET, > > then leaving the NVME_CTRL_RESETTING state change as-is? > > OK, just got to this one. > > Instead of adding yet another state, how about making controller delete > cancel the reset_work (cancel_work_sync)? Yes, that should also work.