Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd: change op delayed state to 'waiting for scrub' #19295

Merged
merged 1 commit into from Dec 8, 2017

Conversation

kungf
Copy link

@kungf kungf commented Dec 2, 2017

when release rwlock, the ops waiting for rwlock are thansfered to
waiting_for_scrub if the object was blocked by scrub, the delayed
state should be changed at the same time.

Signed-off-by: kungf yang.wang@easystack.cn

@kungf
Copy link
Author

kungf commented Dec 4, 2017

@liewegas need a review, please

while (op_iter != p.second.end()) {
(*op_iter)->mark_delayed("waiting for scrub");
++op_iter;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

for (auto op : p.second) {
  op->mark_delayed("waiting for scrub");
}

?
otherwise, lgtm!

@kungf
Copy link
Author

kungf commented Dec 5, 2017

@liewegas code changed, thank you!

@kungf
Copy link
Author

kungf commented Dec 5, 2017

@yangdongsheng

@kungf
Copy link
Author

kungf commented Dec 5, 2017

Jenkins retest this please

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 src/osd/PrimaryLogPG.h 100644 → 100755

@kungf could you revert this chmod change?

@@ -840,6 +840,10 @@ class PrimaryLogPG : public PG, public PGBackend::Listener {
// requeue at front of scrub blocking queue if we are blocked by scrub
for (auto &&p: to_req) {
if (scrubber.write_blocked_by_scrub(p.first.get_head())) {
for (auto op : p.second) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to use auto& to avoid the intrusive_ptr_add_ref and intrusive_ptr_release calls.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,that's right

when release rwlock, the ops waiting for rwlock are thansfered to
waiting_for_scrub if the object was blocked by scrub, the delayed
state should be changed at the same time.

Signed-off-by: kungf <yang.wang@easystack.cn>
@tchaikov tchaikov merged commit b939ab8 into ceph:master Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants