Repository navigation
SBP-2: bus reset only when a logout with a command outstanding fails - #218
Merged
Merged
Conversation
mhellevang
force-pushed
the
fix/sbp2-release-policy
branch
from
October 22, 2026 11:21
4b152b2 to
ce36255
Compare
This was referenced Oct 22, 2026
mhellevang
force-pushed
the
fix/sbp2-release-policy
branch
from
October 23, 2026 07:44
ce36255 to
cbe765b
Compare
mhellevang
marked this pull request as ready for review
October 23, 2026 08:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split of #213 (merge order):
Recovery/teardown policy, on top of #217; draft until that lands. The diff shows #217's commits until then.
#217 already keeps a released command's buffer until the logout status and never resets on client exit. What was left open there: a logout that is rejected synchronously or times out freed the parked buffer without any confirmation that the target had stopped. This closes it the way your item 1 asked: on a failed or unanswered logout with a command outstanding, request a bus reset and keep the command parked until
OnBusResetfrees it. A failed logout with nothing outstanding changes nothing. This is the only reset the release path asks for.Not changed, on purpose: the task's completion to the HBA still happens at release (the buffer is ours, not the caller's), so dext teardown never waits on a logout. Dext teardown itself clears the physical request filter before the bridge releases its sessions (
ExecuteRuntimeTeardown) and tells the registry (PrepareForTeardown), so a logout that fails on a bus going down asks for no reset and the parked command goes with the registry. That came out of a sleep-mid-scan run on the zero-copy branch, where the reset request fired in the middle of the quiesce. The timeout → LUN reset → bus-reset escalation for an unfetched LUN reset stays as on main.Host tests:
LogoutFailureTest(rejected and timed-out logout both request one reset, keep the buffer, free it at the reset) plus the existing parked-command tests. HW: the paths here are a target that drops off the bus mid-command; covered by the power-cycle-mid-READ run on #217 for the reset edge, the failed-logout edge itself needs a device that ignores logout, which I can't produce on demand.