Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
osd: constify OpRequest::get_req(); fix a few cases of operator<< vs mutated message races #13545
Try to use const in as many places as possible. In cases where a Message we are processing is really mutated, annotate it by using a different OpRequest accessor (get_nonconst_req()) and make sure that it cannot race with the Message::print() method (used by operator<< and, most importantly, the asok 'ops' command, which may run at any time and must break due to any of our mutations).
I tried to order this so that it would build in sequence but didn't go back and verify. It should be close.