]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: make racing dup pool rename behave 765/head
authorSage Weil <sage@inktank.com>
Sat, 26 Oct 2013 00:45:06 +0000 (17:45 -0700)
committerSage Weil <sage@inktank.com>
Sat, 26 Oct 2013 00:45:06 +0000 (17:45 -0700)
If we get dup pool rename requests that are racing, make sure the second
one comes back with 'success' if the rename entry already exists in the
pending_inc map.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/OSDMonitor.cc

index 53f2e9491c72034e7cc6b49d82b9d536a449f304..14a5d70407172b3320ea158da77faae81443938c 100644 (file)
@@ -4348,7 +4348,7 @@ int OSDMonitor::_prepare_rename_pool(uint64_t pool, string newname)
   for (map<int64_t,string>::iterator p = pending_inc.new_pool_names.begin();
        p != pending_inc.new_pool_names.end();
        ++p) {
-    if (p->second == newname) {
+    if (p->second == newname && p->first != pool) {
       return -EEXIST;
     }
   }