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: fix stat sum update of recovery pushing #13328

Merged
merged 1 commit into from Feb 14, 2017
Merged

Conversation

wonzhq
Copy link
Contributor

@wonzhq wonzhq commented Feb 9, 2017

Use the stat field of PushInfo to do the stat update, which is
more accurate, especially in the case of sparse file. Also,
remove the stat sum update in on_peer_recover, which is done in
on_global_recover.

Signed-off-by: Zhiqiang Wang zhiqiang@xsky.com

Use the stat field of PushInfo to do the stat update, which is
more accurate, especially in the case of sparse file. Also,
remove the stat sum update in on_peer_recover, which is done in
on_global_recover.

Signed-off-by: Zhiqiang Wang <zhiqiang@xsky.com>

get_parent()->release_locks(pi->lock_manager);
object_stat_sum_t stat = pi->stat;
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd suggest move this into the if (pushing[soid].empty()) { branch. and better off declare it as a reference. also where *_recovered field are set? we don't set them in ReplicatedBackend::prep_push().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pi is erased from pushing and set to NULL before the if branch. See the two lines following.
The *_recovered fields are set in build_push_op.

@tchaikov tchaikov added the core label Feb 9, 2017
@yuriw yuriw merged commit 58a0c32 into ceph:master Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants