From: Jesse Taube <jtaubepe@redhat.com>
To: linux-nvme@lists.infradead.org
Cc: linux-scsi@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Justin Tee <justin.tee@broadcom.com>,
Naresh Gottumukkala <nareshgottumukkala83@gmail.com>,
Paul Ely <paul.ely@broadcom.com>,
Chaitanya Kulkarni <kch@nvidia.com>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Nilesh Javali <njavali@marvell.com>,
GR-QLogic-Storage-Upstream@marvell.com,
Hannes Reinecke <hare@suse.de>, Jesse Taube <jtaubepe@redhat.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
John Meneghini <jmeneghi@redhat.com>,
Bryan Gurney <bgurney@redhat.com>,
Chris Leech <cleech@redhat.com>,
"Ewan D . Milne" <emilne@redhat.com>,
shinichiro.kawasaki@wdc.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: [PATCH v2 0/7] nvme-fc: FPIN link integrity handling
Date: Wed, 2 Sep 2026 16:05:40 -0400 [thread overview]
Message-ID: <20260902200547.184734-1-jtaubepe@redhat.com> (raw)
This set has been split into an NVMe set which adds marginal path
handling and a SCSI set which handles decoding FPIN LI events and
setting the marginal flag. The NVMe set, this one, can be tested and
used independently of the SCSI set.
FPIN LI (link integrity) messages are received when the attached fabric
detects hardware errors. In response, I/O should be directed away from
the affected ports. This series adds a new controller flag
'NVME_CTRL_MARGINAL' which is checked during multipath path selection,
causing the path to be de-prioritized. If no other paths are available
the marginal paths are still used.
Testing was performed by Jesse Taube and John Meneghini using blktests
with the fcloop driver.
Controllers on the affected port show the NVME_CTRL_MARGINAL flag:
\
+- nvme4 fc traddr=c,host_traddr=e live optimized
+- nvme5 fc traddr=8,host_traddr=e live non-optimized
+- nvme8 fc traddr=e,host_traddr=f marginal optimized
+- nvme9 fc traddr=a,host_traddr=f marginal non-optimized
All multipath io-policies were verified: numa, round-robin, and
queue-depth. Scenarios included optimized, non-optimized, and
inaccessible, and marginal paths. When all paths are
marginal, I/O continues based on the multipath policy.
Original work on this set was presented at the LSFMM 2024 conference:
Link: https://people.redhat.com/jmeneghi/LSFMM_2024/LSFMM_2024_NVMe_Cancel_and_FPIN.pdf
To test path handling use:
https://github.com/linux-blktests/blktests/pull/264
or
https://lore.kernel.org/linux-nvme/20260828153029.853768-1-jtaubepe@redhat.com/T/
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220329
Previously posted as a combined NVMe+SCSI series (v1-v11).
V1 -> V2:
- Changed flag name to 'marginal'
- Do not block marginal path; influence path selection instead
to de-prioritize marginal paths
V2 -> V3:
- Split off driver-specific modifications
- Introduce 'union fc_tlv_desc' to avoid casts
V3 -> V4:
- Include reviews from Justin Tee
- Split marginal path handling patch
V4 -> V5:
- Change 'u8' to '__u8' on fc_tlv_desc to fix a failure to build
- Print 'marginal' instead of 'live' in the state of controllers
when they are marginal
V5 -> V6:
- Minor spelling corrections to patch descriptions
V6 -> V7:
- No code changes; added note about additional testing
V7 -> V8:
- Split nvme core marginal flag addition into its own patch
- Add patch for queue_depth marginal path support
V8 -> V9:
- Rebased patch series to nvme-6.17.
- Added patch from Gustavo Silva, "scsi: qla2xxx: Fix memcpy field-spanning
write issue", which resolves the field-spanning write issue
- We decided to leave the "marginal" state as is, because the transport
driver uses the term "marginal".
V9 -> V10:
- Rebased patch series to nvme-6.18.
- Refactor and fix a patch from Gustavo Silva, "scsi: qla2xxx: Fix 2 memcpy
field-spanning write issue", which resolves the field-spanning write
issue.
This new version of Gustavo's patch fixes a bug found in testing.
- Refactored original implementation
New functions added:
nvme_fc_lport_from_wwpn() - Find local port by WWPN
nvme_fc_fpin_set_state() - Set marginal state on controllers
nvme_fc_modify_rport_fpin_state() - Main API function
Functions removed:
nvme_fc_fpin_li_lport_update() - FPIN processing logic
nvme_fc_fpin_rcv() - Direct FPIN message processing
Functions modified:
fc_rport_set_marginal_state - allows administrative control
V10 -> V1:
- Rebase onto 7.2-rc1
- Add marginal support to fcloop driver (new patch)
- Rewrite multipath handling ("nvme-fc: marginal path handling") and
("nvme-multipath: queue-depth support for marginal paths") replacing
them with ("nvme-multipath: round-robin...")
("nvme-fc: marginal path handling...") and
("nvme-multipath: queue-depth support")
- New patch ("scsi: scsi_transport_fc: Add set_rport_marginal to ")
replaces ("scsi: scsi_transport_fc: add fc_host_fpin_set_nvme").
Uses existing function template to add a new callback for setting
the marginal state on a remote port, similar to the existing
set_rport_dev_loss_tmo() callback.
- Replace `nvme_fc_modify_rport_fpin_state` with
`nvme_fc_set_remoteport_fpin` which takes
`struct nvme_fc_remote_port` instead of wwpn and wwnn
- Rewrite the "enable FPIN notification for NVMe" patches
to use the new callback methods.
V1 -> V2 (split):
- Split SCSI and NVME parts.
- Rewrite path handling code.
Bryan Gurney (2):
nvme: add NVME_CTRL_MARGINAL flag
nvme: sysfs: emit the marginal path state in show_state()
Jesse Taube (4):
nvme-multipath: numa support for marginal paths
nvme-multipath: round-robin support for marginal paths
nvme-fc: add nvme_fc_set_remoteport_fpin()
nvme: fcloop: Add set_marginal_rport to sysfs
John Meneghini (1):
nvme-multipath: queue-depth support for marginal paths
drivers/nvme/host/core.c | 1 +
drivers/nvme/host/fc.c | 17 +++++++++
drivers/nvme/host/multipath.c | 70 ++++++++++++++++++++++++++++++----
drivers/nvme/host/nvme.h | 11 ++++++
drivers/nvme/host/sysfs.c | 3 ++
drivers/nvme/target/fcloop.c | 50 ++++++++++++++++++++++++
include/linux/nvme-fc-driver.h | 2 +
7 files changed, 146 insertions(+), 8 deletions(-)
--
2.55.0
next reply other threads:[~2026-09-02 20:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 20:05 Jesse Taube [this message]
2026-09-02 20:05 ` [PATCH v2 1/7] nvme: add NVME_CTRL_MARGINAL flag Jesse Taube
2026-09-02 20:05 ` [PATCH v2 2/7] nvme-multipath: numa support for marginal paths Jesse Taube
2026-09-02 20:05 ` [PATCH v2 3/7] nvme-multipath: queue-depth " Jesse Taube
2026-09-02 20:05 ` [PATCH v2 4/7] nvme-multipath: round-robin " Jesse Taube
2026-09-02 20:05 ` [PATCH v2 5/7] nvme: sysfs: emit the marginal path state in show_state() Jesse Taube
2026-09-02 20:05 ` [PATCH v2 6/7] nvme-fc: add nvme_fc_set_remoteport_fpin() Jesse Taube
2026-09-02 20:05 ` [PATCH v2 7/7] nvme: fcloop: Add set_marginal_rport to sysfs Jesse Taube
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260902200547.184734-1-jtaubepe@redhat.com \
--to=jtaubepe@redhat.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=axboe@kernel.dk \
--cc=bgurney@redhat.com \
--cc=cleech@redhat.com \
--cc=corbet@lwn.net \
--cc=emilne@redhat.com \
--cc=gustavoars@kernel.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jmeneghi@redhat.com \
--cc=justin.tee@broadcom.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nareshgottumukkala83@gmail.com \
--cc=njavali@marvell.com \
--cc=paul.ely@broadcom.com \
--cc=sagi@grimberg.me \
--cc=shinichiro.kawasaki@wdc.com \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox