From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f47.google.com (mail-dl1-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87D752DB79E for ; Sat, 28 Feb 2026 01:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772241154; cv=none; b=lYsxO+G6apRXRTuCwfGBP0bAqLfwYrMBiNNAIRTgyyei4TNyndJ9aah972Kz/lbMZ84zJrqdwtvAkfE3Bm5zsZkIe9Ua82cSwfoU93M1ctNygajG4U74HE15wpmORg8C+R/FF29Uridd2FzJN3F/j+nvQRCFdXin38hRXTsQteY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772241154; c=relaxed/simple; bh=O1mh636Wa7D2UCgrguJRtmUeKs0vv+wi+Iy7w1jZQ14=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=GYx3k1ggbOtUhOPHK8WiQvi4fwHOobOL9eGV8ytEuR5PRgrPUhz7koYf3ZEz4FJHGPTgJe0mDvNizVcmaNcc70tjgB4yK0+8jopCfK0fm9azqpuAvaQM2FtAB/GkqbAkkhbNZWBoQtIcl0YBWZLk7zPObQ3EI0XTP0pveoHhDk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BbqgiKoc; arc=none smtp.client-ip=74.125.82.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BbqgiKoc" Received: by mail-dl1-f47.google.com with SMTP id a92af1059eb24-1273349c56bso3276253c88.0 for ; Fri, 27 Feb 2026 17:12:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772241151; x=1772845951; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=Vsir7RzWJTF5T+JtYgTpKZswmD6bp2siqT17GC9wqT0=; b=BbqgiKocYefN3H4FqxvnXSVxBmcu1JSHIrfx52xV6iUfdc3SFzEPYFwmx8hLrHPDli 8pq0PPSw7m+O6XG7/s7wqeW31pk9lDkyFDs5j8UcxDBhxDHuusMCamvBXBl/RsuARWKI h1vhR0q2v7J403XV5lZtdO3g6s0CnnD4LQKjaSW3Dhq+25VczQKfhZ6ZrYQSPf7D9Bsm 5J/3waH9IM3YknRitsBqTWx3K0h0+mdKKMUq1jAmY5mYdP8fbSjTcjrrbh5L7GZkRQn1 tSdgwNokPWl5MzCsne9qmiE93+M4IufTId1W71NWYW5Na9CL/OPywmzZ134OI/OPz2tf 2iaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772241151; x=1772845951; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vsir7RzWJTF5T+JtYgTpKZswmD6bp2siqT17GC9wqT0=; b=CCbmCwnkVMXRy916AZm08zVNw/9Ar2yjMaTxfXh8Gse8pLCKacbQUPdLWBgeUaZL7x 5jZJFu4ftyFxo3n9nzTDBwkx7WEP3jxiWKT2XG+Rh8uDxDaj3v4tZZ017wPxAaPRUJ7U HMpTwytvu+J8ekFt7db/Ow9l9R3Ec75jZOxJs5HPmPsjdVMG89TnEUAHJrozy6dJabxZ gDjzm3yzrIzK7IoPmZJmW1O1VVRgx993UyZu+M3MrZ7ff5/xgmVY9nU6f0kyVEZzX1J4 gG4UipZjBVvQJH6gooro+gwrSWzGZTXvC10yax6mancAL1v7WKWKTB5SXszEZm36ioFW kldQ== X-Forwarded-Encrypted: i=1; AJvYcCVk+rSp4U8NE0wxR7DyxSW65Z8kGEcDS+Luco5Rk8yOL+xFdPnMZeWXnbkmYfpMwCLsrrFP+WEtqtXvfvo=@vger.kernel.org X-Gm-Message-State: AOJu0YxcASDySIpV1y9jVSu2BQEwHQ4XK+qWUthAT2K1eAfV+50PvpLT ZJjOIEi+naXWGfWLs1kyzymiucxmXLHuQjJEfXsLY5cSKOOtnwrmCCO/ X-Gm-Gg: ATEYQzzFYK7hs90BvJ/WV9lqI1E+5hLdQae1ZX49hnXkcNIaWPnFQ39pTsbBHjGrULb Gtl8BcDbU7u/oJHYpTyl5ZYNhmbxMg8McQ0f4eDPlT0KSrsl3Zfo3aOuFavQD5CwXnrOuQWW2fe MeaAoTm+pcJQ3atercYB4FgO3YioAMLTU5au4kl1MKcgAR2cVUQyDiZF2SH+QGpR3X8j2nHDtLt 8/H3GzJUPlS0AK8yOc3KEKNHutve4mDzM8wvvnjRU1B2UYEg75S0ubOW+5H8NFCXSGsnKvGslWg l5ZseOcelIrqkCUrr3ourySxeF36L1EJ+WPn3k4ys+AAnYnGDcg69evBiRHwy9fkvijrgghHiEI AGANelWrjveTKtrYgrXCqpYILOrMoSXZ22aZ9Il5WgFqZRQLNnbsQFHk0eAdyF/qmbmrww8XTFv wccXkwN1Kjhy6QFASnFYrIFXXs3yX6dy43r0FSjypOWk0+ X-Received: by 2002:a05:7022:6723:b0:127:5cda:ab0f with SMTP id a92af1059eb24-1278fb604damr2414632c88.5.1772241151375; Fri, 27 Feb 2026 17:12:31 -0800 (PST) Received: from [10.69.56.189] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12789962f89sm5830261c88.0.2026.02.27.17.12.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Feb 2026 17:12:30 -0800 (PST) Message-ID: <4029a0f6-4135-4609-9cb4-9fbd014b85fb@gmail.com> Date: Fri, 27 Feb 2026 17:12:28 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: James Smart Subject: Re: [PATCH v3 15/21] nvme-fc: Do not cancel requests in io taget before it is initialized To: Mohamed Khalfella , Justin Tee , Naresh Gottumukkala , Paul Ely , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Hannes Reinecke , jsmart833426@gmail.com Cc: Aaron Dailey , Randy Jennings , Dhaval Giani , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260214042753.4073668-1-mkhalfella@purestorage.com> <20260214042753.4073668-16-mkhalfella@purestorage.com> Content-Language: en-US In-Reply-To: <20260214042753.4073668-16-mkhalfella@purestorage.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/13/2026 8:25 PM, Mohamed Khalfella wrote: > A new nvme-fc controller in CONNECTING state sees admin request timeout > schedules ctrl->ioerr_work to abort inflight requests. This ends up > calling __nvme_fc_abort_outstanding_ios() which aborts requests in both > admin and io tagsets. In case fc_ctrl->tag_set was not initialized we > see the warning below. This is because ctrl.queue_count is initialized > early in nvme_fc_alloc_ctrl(). > > nvme nvme0: NVME-FC{0}: starting error recovery Connectivity Loss > INFO: trying to register non-static key. > The code is fine but needs lockdep annotation, or maybe > lpfc 0000:ab:00.0: queue 0 connect admin queue failed (-6). > you didn't initialize this object before use? > turning off the locking correctness validator. > Workqueue: nvme-reset-wq nvme_fc_ctrl_ioerr_work [nvme_fc] > Call Trace: > > dump_stack_lvl+0x57/0x80 > register_lock_class+0x567/0x580 > __lock_acquire+0x330/0xb90 > lock_acquire.part.0+0xad/0x210 > blk_mq_tagset_busy_iter+0xf9/0xc00 > __nvme_fc_abort_outstanding_ios+0x23f/0x320 [nvme_fc] > nvme_fc_ctrl_ioerr_work+0x172/0x210 [nvme_fc] > process_one_work+0x82c/0x1450 > worker_thread+0x5ee/0xfd0 > kthread+0x3a0/0x750 > ret_from_fork+0x439/0x670 > ret_from_fork_asm+0x1a/0x30 > > > Update the check in __nvme_fc_abort_outstanding_ios() confirm that io > tagset was created before iterating over busy requests. Also make sure > to cancel ctrl->ioerr_work before removing io tagset. > > Signed-off-by: Mohamed Khalfella > --- > drivers/nvme/host/fc.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c > index e605dd3f4a40..eac3a7ccaa5c 100644 > --- a/drivers/nvme/host/fc.c > +++ b/drivers/nvme/host/fc.c > @@ -2557,7 +2557,7 @@ __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues) > * io requests back to the block layer as part of normal completions > * (but with error status). > */ > - if (ctrl->ctrl.queue_count > 1) { > + if (ctrl->ctrl.queue_count > 1 && ctrl->ctrl.tagset) { > nvme_quiesce_io_queues(&ctrl->ctrl); > nvme_sync_io_queues(&ctrl->ctrl); > blk_mq_tagset_busy_iter(&ctrl->tag_set, > @@ -2954,6 +2954,11 @@ nvme_fc_create_io_queues(struct nvme_fc_ctrl *ctrl) > out_delete_hw_queues: > nvme_fc_delete_hw_io_queues(ctrl); > out_cleanup_tagset: > + /* > + * In CONNECTING state ctrl->ioerr_work will abort both admin > + * and io tagsets. Cancel it first before removing io tagset. > + */ > + cancel_work_sync(&ctrl->ioerr_work); > nvme_remove_io_tag_set(&ctrl->ctrl); > nvme_fc_free_io_queues(ctrl); > looks good Signed-off-by: James Smart -- james