Skip to content

blk/spdk: return NVMe I/O errors and do not use a freed IOContext - #73172

Open
mmgaggle wants to merge 1 commit into
ceph:mainfrom
mmgaggle:wip-kbader-spdk-io-errors
Open

mmgaggle wants to merge 1 commit into
ceph:mainfrom
mmgaggle:wip-kbader-spdk-io-errors

Conversation

@mmgaggle

Copy link
Copy Markdown
Member

Summary

io_complete() asserted that every NVMe completion succeeded, so a media error crashed the OSD. Now read() returns -EIO, and an aio fails an IOContext that allows EIO, as KernelDevice does.

The last aio callback can free the IOContext. A write released its buffers after that callback, and _aio_handle() read num_running after it. Now neither does.

Fixes: https://tracker.ceph.com/issues/82191

Testing

I did not build this change with WITH_SPDK=ON. No automated test covers this path, because it needs an NVMe device bound to SPDK.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

io_complete asserted that every NVMe completion succeeded, so a media
error crashed the OSD. Now read() returns -EIO, and an aio fails an
IOContext that allows EIO, as in KernelDevice. The last aio callback can
free the IOContext, but a write released its buffers after it and
_aio_handle() read num_running after it. Now neither does.

Fixes: https://tracker.ceph.com/issues/82191
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
@mmgaggle
mmgaggle requested a review from a team as a code owner October 27, 2026 22:30
@github-actions github-actions Bot added the core label Oct 27, 2026
@mmgaggle mmgaggle mentioned this pull request Oct 27, 2026
5 of 14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant