Skip to content

nvme/mpath: fix missed namespaces in ana state update

Anton Eidelman linux-nvme 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v2 posting 2/20 of 3 patches 0 repliesSuperseded
  3. v2 posting 1/23 patches 22 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches0 repliesSuperseded

CHANGES in V2 from the cover letter

- 3/3: last_ns_nsid was not updated in every iteration, which is wrong CHANGES in V3:
- 2/3: use unsigned instead of unsigned int (ignore checkpatch on this)
- 3/3: use unsigned instead of unsigned int for last_ns_nsid

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nvme/multipath: fix failure to update ns ana statedrivers/nvme/host/multipath.c+5 -20 replies
2/3nvme/multipath: cosmetic: keep ns nsid locallydrivers/nvme/host/multipath.c+5 -30 replies
3/3nvme/multipath: fix stale ana state for namespaces just added by scan workdrivers/nvme/host/multipath.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] nvme/mpath: fix missed namespaces in ana state update

Fixed two issues in nvme_update_ana_state() that caused ana_work to miss existing namespaces and consequently a failure to update the namespace ANA state based on the ANA log page.

1) A plain bug: we skipped an nsid in desc->nsids in a certain combination of nsids present and nsids reports in the ANA log, and failed to match this nsid to an existing namespace.
2) Unhandled situation when scan_work appended new namespaces to ctrl->namespaces and did not sort the list yet.
In such transient state ana_work would fail to match nsids to those new namespaces.

Both issues potentially caused some namespaces to get stuck in an incorrect ANA state, e.g. to never become live.

CHANGES in V2:
- 3/3: last_ns_nsid was not updated in every iteration, which is wrong CHANGES in V3:
- 2/3: use unsigned instead of unsigned int (ignore checkpatch on this)
- 3/3: use unsigned instead of unsigned int for last_ns_nsid

Anton Eidelman (3):
nvme/multipath: fix failure to update ns ana state nvme/multipath: cosmetic: keep ns nsid locally nvme/multipath: fix stale ana state for namespaces just added by scan
work

 drivers/nvme/host/multipath.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
Signature · 7 lines
2.25.1


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme