]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: cleanly fail bench-write upon failure
authorJason Dillaman <dillaman@redhat.com>
Tue, 12 Apr 2016 15:23:19 +0000 (11:23 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 12 Apr 2016 20:23:44 +0000 (16:23 -0400)
Fixes: http://tracker.ceph.com/issues/15456
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd/action/BenchWrite.cc

index 849340b50457060422fee18774b0b2eedf5c4005..3cd90ea271b5afe8169255a19e3c771e195d7460 100644 (file)
@@ -105,7 +105,7 @@ void rbd_bencher_completion(void *vc, void *pc)
   int ret = c->get_return_value();
   if (ret != 0) {
     cout << "write error: " << cpp_strerror(ret) << std::endl;
-    assert(0 == ret);
+    exit(ret < 0 ? -ret : ret);
   }
   b->lock.Lock();
   b->in_flight--;