Re: [PATCH v2 1/7] nvme: add NVME_CTRL_MARGINAL flag
From: Hannes Reinecke
Date: Mon Sep 21 2026 - 11:15:38 EST
On 9/2/26 10:05 PM, Jesse Taube wrote:
From: Bryan Gurney <bgurney@xxxxxxxxxx>Reviewed-by: Hannes Reinecke <hare@xxxxxxxxxx>
Add a new controller flag, NVME_CTRL_MARGINAL, to help multipath I/O
policies to react to a path that is set to a "marginal" state.
The "marginal" flag is initialized to false in `nvme_init_ctrl` and
cleared in `nvme_fc_ctrl_connectivity_loss` before re-association.
It is only cleared there, not in the generic `nvme_reset_ctrl` path,
because the marginal condition reflects a physical link problem.
An arbitrary controller reset does not signal that a hardware fault has
been resolved. Calling `nvme_fc_ctrl_connectivity_loss` means the FC
association has failed and will be re-established, so the prior link
quality state is no longer meaningful.
Signed-off-by: Bryan Gurney <bgurney@xxxxxxxxxx>
---
V10 -> V1:
- No change
V1 -> V2:
- Add nvme_ctrl_assign_marginal
- Fix nvme_fc_ctrl_connectivity_loss clearing wrong bit.
- Update commit message
---
drivers/nvme/host/core.c | 1 +
drivers/nvme/host/fc.c | 4 ++++
drivers/nvme/host/nvme.h | 11 +++++++++++
3 files changed, 16 insertions(+)
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich