Repository navigation
osdc/Objecter: release an op failed with pool EIO in _op_submit() - #72282
Merged
Merged
Conversation
JonBailey1993
approved these changes
Oct 1, 2026
JonBailey1993
left a comment
Contributor
There was a problem hiding this comment.
Looks good with a couple of optional small nits
| _session_op_assign(splitop_session, op); | ||
| _maybe_arm_op_timeout(op); | ||
| inflight_ops++; | ||
| op->inflight_accounted = true; |
Contributor
There was a problem hiding this comment.
nit: Given this always needs to be called together with inflight_ops++, would an inline method be better to keep these tied together?
Contributor
Author
There was a problem hiding this comment.
Fixed (and, also - led me to have an additional fix in the PR)
| not_eio->set_value(eio_ops); | ||
| return; | ||
| } | ||
| unsigned bad = 0; |
Contributor
There was a problem hiding this comment.
nit: I'm not keen on the name bad here, perhaps not_eio_count or something might be clearer?
ronen-fr
force-pushed
the
wip-rf-recalc
branch
2 times, most recently
from
October 1, 2026 14:14
b757b46 to
2f132a1
Compare
Contributor
Author
|
@JonBailey1993 - apart from the nits, I fixed another missing counter increment. Can you take a second look? |
JonBailey1993
approved these changes
Oct 1, 2026
| unsigned not_eio_count = 0; | ||
| for (unsigned i = 0; i < eio_ops; ++i) { | ||
| if (ioctx.write(oid, bl, bl.length(), 0) != -EIO) { | ||
| ++not_eio_count; |
When _calc_target() returns RECALC_OP_TARGET_POOL_EIO, _op_submit() completed the op with -EIO and returned. The op was never assigned to a session, so it never reached _finish_op(): its throttle budget and the Objecter's reference were leaked, and a resubmitted op (redirect, -EAGAIN) also kept its in-flight count and a stale timeout event. A client that keeps submitting to a pool flagged EIO would eventually block all of its ops in the throttle. Add _finish_unsent_op() to release these, and track whether the op was counted in inflight_ops and in the op_active perf counter, so that a first submission is not un-counted. add_op_to_splitop_session() counted its op in inflight_ops but left op_active to _send_op_account(), which a split-read parent never reaches, while _finish_op() decrements op_active for every op. The gauge was thus driven below the real count by each split read, and _finish_unsent_op(), keyed off the same flag, would do the same. Count op_active there as well, so that it tracks inflight_ops. Also make SplitOp::create() decline to split reads on a pool flagged EIO. Sub-ops would now be freed inside _op_submit() while create() still references them, and a single-op direct read skipped _calc_target(), and with it the EIO check. Extend LibRadosAio.PoolEIOFlag test to write to the EIO pool from a client with a small objecter_inflight_ops; the writes block if the budget leaks. Assisted-by: Claude Signed-off-by: Ronen Friedman <[email protected]>
ronen-fr
force-pushed
the
wip-rf-recalc
branch
from
October 1, 2026 15:23
2f132a1 to
223da8c
Compare
jdurgin
approved these changes
Oct 5, 2026
Member
|
Nice straight-forward fix! |
Contributor
|
This PR has been added to wip-bharath31-testing-20261006.075505-main. |
4 of 14 tasks
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.
When _calc_target() returns RECALC_OP_TARGET_POOL_EIO, _op_submit() completed the op with -EIO and returned. The op was never assigned to a session, so it never reached _finish_op(): its throttle budget and the Objecter's reference were leaked, and a resubmitted op (redirect, -EAGAIN) also kept its in-flight count and a stale timeout event. A client that keeps submitting to a pool flagged EIO would eventually block all of its ops in the throttle.
Add _finish_unsent_op() to release these, and track whether the op was counted in inflight_ops so that a first submission is not un-counted.
Also make SplitOp::create() decline to split reads on a pool flagged EIO. Sub-ops would now be freed inside _op_submit() while create() still references them, and a single-op direct read skipped _calc_target(), and with it the EIO check.
Extend LibRadosAio.PoolEIOFlag test to write to the EIO pool from a client with a small objecter_inflight_ops; the writes block if the budget leaks.