From 40e8dbbb6b142da5f960a7f04cba085da43509dc Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 17 Apr 2014 15:28:22 +0100 Subject: [PATCH] mon: EBUSY instead of EAGAIN when pgs creating In 69321bf, EAGAIN changed behaviour to block indefinitely rather than returning to user. Change the return for `osd pool set` operations that are blocked by creating PGs to return EBUSY instead of EAGAIN, so that they are excepted from this blocking behaviour. Signed-off-by: John Spray --- src/mon/OSDMonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index eb0561b07831e..2b4a3a4a3d69e 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3346,7 +3346,7 @@ int OSDMonitor::prepare_command_pool_set(map &cmdmap, ++i) { if (i->m_pool == static_cast(pool)) { ss << "currently creating pgs, wait"; - return -EAGAIN; + return -EBUSY; } } p.set_pg_num(n); @@ -3368,7 +3368,7 @@ int OSDMonitor::prepare_command_pool_set(map &cmdmap, ++i) { if (i->m_pool == static_cast(pool)) { ss << "currently creating pgs, wait"; - return -EAGAIN; + return -EBUSY; } } p.set_pgp_num(n); -- 2.39.5