]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: check write return code during bench-write
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 6 Dec 2013 01:44:37 +0000 (17:44 -0800)
committerSage Weil <sage@inktank.com>
Mon, 30 Dec 2013 16:38:23 +0000 (08:38 -0800)
This is allows rbd-bench to detect http://tracker.ceph.com/issues/6938
when combined with rapidly changing the mon osd full ratio.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 3caf3effcb113f843b54e06099099909eb335453)

src/rbd.cc

index 41cd243735520fddbc2f54c23b280f7362b827d5..02187cdbf999fce1f502c52201f1b0a2e126b923 100644 (file)
@@ -867,6 +867,11 @@ void rbd_bencher_completion(void *vc, void *pc)
   librbd::RBD::AioCompletion *c = (librbd::RBD::AioCompletion *)vc;
   rbd_bencher *b = static_cast<rbd_bencher *>(pc);
   //cout << "complete " << c << std::endl;
+  int ret = c->get_return_value();
+  if (ret != 0) {
+    cout << "write error: " << cpp_strerror(ret) << std::endl;
+    assert(0 == ret);
+  }
   b->lock.Lock();
   b->in_flight--;
   b->cond.Signal();