]> 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:49:22 +0000 (08:49 -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 7d5d46611ec02e5bf01b5a0edb881e7f5a45bf1a..6041ddeff1b70b71715b94b85d7f43a5f0bb02f0 100644 (file)
@@ -865,6 +865,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();