]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: EBUSY instead of EAGAIN when pgs creating 1677/head
authorJohn Spray <john.spray@inktank.com>
Thu, 17 Apr 2014 14:28:22 +0000 (15:28 +0100)
committerJohn Spray <john.spray@inktank.com>
Thu, 17 Apr 2014 14:28:22 +0000 (15:28 +0100)
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 <john.spray@inktank.com>
src/mon/OSDMonitor.cc

index eb0561b07831eeb5f91f240a82fecd66ae3b4fd6..2b4a3a4a3d69e6f140ae89095c6d77576acec668 100644 (file)
@@ -3346,7 +3346,7 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
        ++i) {
       if (i->m_pool == static_cast<uint64_t>(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<string,cmd_vartype> &cmdmap,
        ++i) {
       if (i->m_pool == static_cast<uint64_t>(pool)) {
        ss << "currently creating pgs, wait";
-       return -EAGAIN;
+       return -EBUSY;
       }
     }
     p.set_pgp_num(n);