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

fix broken use of streamstream::rdbuf() #19998

Merged
merged 2 commits into from Jan 21, 2018
Merged

Conversation

liewegas
Copy link
Member

@@ -5981,7 +5981,7 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
if (err == 0) {
k = erasure_code->get_data_chunk_count();
} else {
ss << __func__ << " get_erasure_code failed: " << tmp.rdbuf();
ss << __func__ << " get_erasure_code failed: " << tmp.str();
Copy link
Contributor

Choose a reason for hiding this comment

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

@liewegas could you take this opportunity to s/rdbuf/str/ in PG.cc also?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep fixed, not sure how i missed that one :)

Fixes: http://tracker.ceph.com/issues/22715
Signed-off-by: Sage Weil <sage@redhat.com>
Several commands use 'id' but for other types (e.g., vector<int64_t>).

Signed-off-by: Sage Weil <sage@redhat.com>
prefix != "osd pg-upmap" &&
prefix != "osd pg-upmap-items") { // avoid commands with non-int id arg
osdid_present = cmd_getval(cct, cmdmap, "id", osdid);
}
if (osdid_present) {
Copy link
Contributor

Choose a reason for hiding this comment

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

since you are at here, could you remove the following if block and the string name; at 0580f01#diff-0a5db46a44ae9900e226289a810f10e8R7242 ? as name is always shadowed by the code which handles the specific commands.

@liewegas liewegas merged commit bfd84c9 into ceph:master Jan 21, 2018
@liewegas liewegas deleted the wip-22715 branch January 21, 2018 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants