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

rgw: migrate atomic_t to std::atomic<> (ebirah) #14839

merged 1 commit into from May 1, 2017


None yet
2 participants

chardan commented Apr 27, 2017

Refer-to: #14655

This should contain all RGW changes (it's possible that there are minor patches elsewhere, but this will certainly be the bulk of them).

Signed-off-by: Jesse Williamson

@@ -542,7 +544,7 @@ class RGWCoroutinesManager {
int run(list<RGWCoroutinesStack *>& ops);
int run(RGWCoroutine *op);
void stop() {
if ( == 1) {
if (!going_down) {

This comment has been minimized.


cbodley Apr 28, 2017


the inc() here was important, allowing stop() to be called multiple times, but only calling completion_mgr->go_down() the first time

you -could- turn it back into an atomic<unsigned> and use if (++going_down == 1), but i think compare_exchange is a better fit for this:

bool expected = false;
if (going_down.compare_exchange_strong(expected, true)) {

This comment has been minimized.


chardan Apr 28, 2017


Good catch! Thank you. Patched.

rgw: migrate atomic_t to std::atomic<>
Signed-off-by: Jesse Williamson <>

This comment has been minimized.


cbodley commented May 1, 2017

after fix to RGWCoroutinesManager::stop(), passed rgw suite:


cbodley approved these changes May 1, 2017

@cbodley cbodley merged commit 1e0b919 into ceph:master May 1, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Unmodifed Submodules submodules for project are unmodified
default Build finished.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment