From 4944618fe74e1875e37a5de9a5bfe3922f906942 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Thu, 5 Dec 2013 17:44:37 -0800 Subject: [PATCH] rbd: check write return code during bench-write 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 (cherry picked from commit 3caf3effcb113f843b54e06099099909eb335453) --- src/rbd.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rbd.cc b/src/rbd.cc index 7d5d46611ec02..6041ddeff1b70 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -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(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(); -- 2.39.5