From 8282e24dd6ff383e6b5c11ddffd825a2a0754886 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 25 Oct 2013 17:45:06 -0700 Subject: [PATCH] mon/OSDMonitor: make racing dup pool rename behave 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 --- src/mon/OSDMonitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 53f2e9491c72..14a5d7040717 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4348,7 +4348,7 @@ int OSDMonitor::_prepare_rename_pool(uint64_t pool, string newname) for (map::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; } } -- 2.47.3