nvmet: fix subtle race in I/O processing and ns configuration
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 7 repliesIn review
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Replace the XArray mark used to determine whether I/O should be admitted with an atomic bit. Using an XArray mark would touch significantly more cache lines in the I/O hot path than a simple bit test (hch)
- Introduce the NVMET_NS_IO_LIVE namespace flag to address the cache line overhead of using an XArray mark.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | nvmet: defer setting ns->enabled to false in nvmet_ns_disable()drivers/ drivers/ | +9 | 4 replies | |
| 2/2 | nvmet: don't allow I/O admission after percpu ns reference is killeddrivers/ | +12 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Christoph Hellwig | Shin'ichiro Kawasaki |
|---|---|---|
| 1/2 | R-b | T-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 [PATCH v2 0/2] nvmet: fix subtle race in I/O processing and ns configuration
Hi,
This series addresses two race conditions in the nvmet core code that handles I/O submission and namespace configuration.
The first patch addresses a race where target namespace attributes could be changed while I/O is in progress. The second patch addresses a subtle race that could allow I/O to be admitted even after the percpu reference count has been killed or marked dead.
As usual, feedback, comments, and suggestions are most welcome!
Thanks!
Changes from v1:
- Replace the XArray mark used to determine whether I/O should be admitted with an atomic bit. Using an XArray mark would touch significantly more cache lines in the I/O hot path than a simple bit test (hch)
- Introduce the NVMET_NS_IO_LIVE namespace flag to address the cache line overhead of using an XArray mark.
Nilay Shroff (2):
nvmet: defer setting ns->enabled to false in nvmet_ns_disable()
nvmet: don't allow I/O admission after percpu ns reference is killed
drivers/nvme/target/core.c | 28 ++++++++++++++++++---------- drivers/nvme/target/nvmet.h | 2 ++ 2 files changed, 20 insertions(+), 10 deletions(-)
Signature · 1 line
2.53.0