nvme: NSHEAD_DISK_LIVE fixes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest2 patches 0 repliesNew
- v63 patches 2 repliesSuperseded
- v53 patches 2 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 3 patches | 6 replies | Superseded | |
| v3 | 4 patches | 5 replies | Superseded | |
| v2 | 2 patches | 12 replies | Superseded | |
| v1 | 4 patches | 5 replies | Superseded |
Changes to v7 from the cover letter
- Drop last path
- Update patch description
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | nvme-multipath: system fails to create generic nvme devicedrivers/ | +1 | 0 replies | |
| 2/2 | nvme-multipath: avoid hang on inaccessible namespacesdrivers/ | +10 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Sagi Grimberg | Christoph Hellwig |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCHv8 0/2] nvme: NSHEAD_DISK_LIVE fixes
Hi all,
I'm having a testcase which repeatedly deletes namespaces on the target and creates new namespaces, and aggressively re-using NSIDs for the new namespaces.
To throw in more fun these namespaces are created on different nodes in the cluster, where only the paths local to the cluster node are active, and all other paths are inaccessible.
Essentially it's doing something like:
echo 0 > ${ns}/enable
rm ${ns}
<random delay>
mkdir ${ns}
echo "<dev>" > ${ns}/device_path
echo "<grpid>" > ${ns}/ana_grpid
uuidgen > ${ns}/device_uuid
echo 1 > ${ns}/enable
repeatedly with several namespaces and several ANA groups. This leads to an unrecoverable system where the scanning processes are stuck in the partition scanning code triggered via 'device_add_disk()' waiting for I/O which will never come.
There are two parts to fixing this:
We need to ensure the NSHEAD_DISK_LIVE is properly set when the ns_head is live, and unset when the last path is gone. And we need to trigger the requeue list after NSHEAD_DISK_LIVE has been cleared to flush all outstanding I/O.
With these patches (and the queue freeze patchset from hch) the problem is resolved and the testcase runs without issues.
I see to get the testcase added to blktests.
As usual, comments and reviews are welcome.
Changes to v7:
- Drop last path
- Update patch description
Changes to v6:
- Rename flag to NVME_NSHEAD_FAIL_ON_LAST_PATH and fail I/O only on the last path (Suggested by Sagi)
- Retrigger pending I/O on every ANA state change
Changes to v5:
- Introduce NVME_NSHEAD_DISABLE_QUEUEING flag instead of disabling command retries
Changes to v4:
- Disabled command retries when the controller is removed instead of (ab-)using the failfast flag
Changes to v3:
- Update patch description as suggested by Sagi
- Drop patch to requeue I/O after ANA state changes
Changes to v2:
- Include reviews from Sagi
- Drop the check for NSHEAD_DISK_LIVE in nvme_available_path()
- Add a patch to requeue I/O if the ANA state changed
- Set the 'failfast' flag when removing controllers
Changes to the original submission:
- Drop patch to remove existing namespaces on ID mismatch
- Combine patches updating NSHEAD_DISK_LIVE handling
- requeue I/O after NSHEAD_DISK_LIVE has been cleared
Hannes Reinecke (2):
nvme-multipath: system fails to create generic nvme device
nvme-multipath: avoid hang on inaccessible namespaces
drivers/nvme/host/multipath.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
Signature · 1 line
2.35.3