From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.169]) (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 57F4612CDBE for ; Wed, 31 Dec 2025 21:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767216933; cv=none; b=Oz21NlW2va5iHgpWg5nLRK+DFj16ht2RIWlJyKQ15X5MY6ptXdow41aA/uwiCkj7jM+tAWZrJOnm7nz1J5YfdEB61p/RbWKKPiVBPMEerBbchboXvCEDbGQUvMCKhv1I+5rtRwbxpCgPbJBNFK6J2sZddoluwAASTlWzmfhVeNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767216933; c=relaxed/simple; bh=ytXn53sywoOeb0Biylj86yWK2l1dUYvzZfYJeGafBjw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uvruVLXc/FRPtBghAKFsx7Ab+itHJiX9QccCxlHN5FxRLyrDhLJI7wjmNf9Qz+fzFRcX6GfB05tvYA1ZjtKNj8wmWjqjSfwBNuX/bLXNpp6syVKJ5sYFYocqvLIurycfKSVzSLLRd7sJHVhODUFCkHt0W3XFvpWL7xDA5bJtNno= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=UNJ5IItw; arc=none smtp.client-ip=74.125.82.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="UNJ5IItw" Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-2ae24015dc0so10593614eec.1 for ; Wed, 31 Dec 2025 13:35:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1767216931; x=1767821731; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=muTPllHB/pE0CEfICYtNHH+FjA3I5MdilveUBt/VzE4=; b=UNJ5IItwx5zf1MxrEnxSkPFTWJCAN747HiByoaYrIlZN7R2E0eqXl3PWJ2ElJUGklk y9tKHuKwiWe0022smbLCLU4iFMgb0IYcd0sbtMh2MtX5xDb6jef2PivyCFRtfd+CkXcw fpVfJhAipSkb1Ah2F3s32/+3EpV0IgWWPZFVr2Nxn0SBvQmUqpaS1N0iyqyjBmtG8BrO oGbue7btF9mVJVXQi/zAJp10FDUQFCioMpX2qoYCWODu7boEqiVFPaRx3vm+WRgxznpp Ui5BC0cllxnV3VL501+6+hprw7UGKDwOVVl/sQ75nJP6pgpPPs6qF16W7HyvuNDnVKBP cA8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767216931; x=1767821731; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=muTPllHB/pE0CEfICYtNHH+FjA3I5MdilveUBt/VzE4=; b=AW3MUf6xOUFQiZigddidQuUjgXFH5wt9WgFq3W9GUIH820I99a/Sm9xM20aE+Q/SpV tNqHy1EP493/N9d8mBhP69EW4w4b0V94i1NC/kZW7wvOyeUfluuAsNLTpytKU7pMJmrT ye/rISU+5Yxl2u5vFrmvUmuQCCXFMI05fgDeWe3+IAFT+xrinoEdw0qIEgbjzRkkwovn Z7bNQp0v5pDfD6GOJqEWCF8KlTy0c3cNcNLONXC23R8mMvzxjXWwwaH4Cz0BZ+R3SV7d F1+5tRQuPG3n0xe73jAfElYt9jhFjUUDkznGRjoJ3rRr8JqQhfi8+/YwOgqdqL1Jcdt9 Gv7g== X-Forwarded-Encrypted: i=1; AJvYcCVdz8PRFLx0ThTpN2t47Ti9z2qXZQh3nyHW2pRq8sDuaidC/2UAIG54TbIwb9SvVaYkWJm2fkMPmbh4yHM=@vger.kernel.org X-Gm-Message-State: AOJu0YxxSWweu/GRbPuA5T6AqwY2CI8FDP1JO0jnvYPEi52xORAD48Vi bfN4m/9VwfvE/9ALqvOGRfZeXH7Yoykzp0925h3o89UnpziebodPY7qj9G3+6R/85XM= X-Gm-Gg: AY/fxX4YEpw1CRdvlT3oAK62+95JU1jSFqIBcRPJh/IuCXFnjYlHnvapP96ITBwFcel wdxBdMAhybqdOD+iWC9O1eaf9he3C3zX0CcnxWl76b9ZmNaJ3CJ/C9gVZk2nxRIrhAOwfBGUQMB /1JXvhs+n7fUHpJsGHpOc6ix7IEnJsc7zMUmBhwI/009rsOrXacv7/aNP4cnf3ErigPl5Q/AFS0 PYYNRixqkg4/xyXyZiJZFyyLIY4eby8Gunj8UC7NTwnCTC0Ep/8xTys4fhp6jH4WekITXEWTt4x v92W1GhvvO7RhvroFMzZykASS62pQ0D0peI7U3p5nEbqRgMWw1T1AwIKK31ueKVMsfvl2uSH7F7 63XoncudOz+PnJo6ALsVM1QJAMPDL1bZwqmJRoLKQ/yDimKr3KQr5ZGrI3AcPDKCiXxz8hoszHi EDnQoqVxamOoMBql6Poq6ldPYL7/RHD3rVN+t/hGw2Lw== X-Google-Smtp-Source: AGHT+IGj7vZ+K+Rs8yNMRoW77jO06fTGqONtOHZF/JCfCYHUE5UPNAt/EP69WsAU1R1/uh5ghk6oVg== X-Received: by 2002:a05:693c:838b:20b0:2b0:487c:7aba with SMTP id 5a478bee46e88-2b04cc11b2dmr31173737eec.21.1767216931046; Wed, 31 Dec 2025 13:35:31 -0800 (PST) Received: from medusa.lab.kspace.sh ([208.88.152.253]) by smtp.googlemail.com with UTF8SMTPSA id 5a478bee46e88-2b05fcfc1b7sm83805653eec.0.2025.12.31.13.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Dec 2025 13:35:30 -0800 (PST) Date: Wed, 31 Dec 2025 13:35:29 -0800 From: Mohamed Khalfella To: Sagi Grimberg Cc: Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Aaron Dailey , Randy Jennings , John Meneghini , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 03/14] nvmet: Implement CCR nvme command Message-ID: <20251231213529.GJ3864520-mkhalfella@purestorage.com> References: <20251126021250.2583630-1-mkhalfella@purestorage.com> <20251126021250.2583630-4-mkhalfella@purestorage.com> <3f2c8a9e-2e1c-4cb8-b296-8f61ab16b03a@grimberg.me> <20251225173342.GB8129-mkhalfella@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sat 2025-12-27 11:39:55 +0200, Sagi Grimberg wrote: > > >>> +void nvmet_execute_cross_ctrl_reset(struct nvmet_req *req) > >>> +{ > >>> + struct nvmet_ctrl *ictrl, *ctrl = req->sq->ctrl; > >>> + struct nvme_command *cmd = req->cmd; > >>> + struct nvmet_ccr *ccr, *new_ccr; > >>> + int ccr_active, ccr_total; > >>> + u16 cntlid, status = 0; > >>> + > >>> + cntlid = le16_to_cpu(cmd->ccr.icid); > >>> + if (ctrl->cntlid == cntlid) { > >>> + req->error_loc = > >>> + offsetof(struct nvme_cross_ctrl_reset_cmd, icid); > >>> + status = NVME_SC_INVALID_FIELD | NVME_STATUS_DNR; > >>> + goto out; > >>> + } > >>> + > >>> + ictrl = nvmet_ctrl_find_get_ccr(ctrl->subsys, ctrl->hostnqn, > >> What does the 'i' stand for? > > 'i' stands for impacted controller. Also, if you see sctrl the 's' > > stands for source controller. These terms are from TP8028. > > Can you perhaps add a comment on this? Okay, will do that. > > >>> + new_ccr->ciu = cmd->ccr.ciu; > >>> + new_ccr->icid = cntlid; > >>> + new_ccr->ctrl = ictrl; > >>> + list_add_tail(&new_ccr->entry, &ctrl->ccrs); > >>> + mutex_unlock(&ctrl->lock); > >>> + > >>> + nvmet_ctrl_fatal_error(ictrl); > >> Don't you need to wait for it to complete? > >> e.g. flush_work(&ictrl->fatal_err_work); > >> > >> Or is that done async? will need to look downstream... > > No, we do not need to wait for ictrl->fatal_err_work to complete. An AEN > > will be sent when ictrl exits. It is okay if AEN is sent before CCR > > request is completed. The initiator should expect this behavior and deal > > with it. > > Yes, saw that in a later patch (didn't get to do a full review yet)