]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rados_bencher: re-add written objects constraint to read benchmark.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 3 Jun 2011 18:53:10 +0000 (11:53 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 3 Jun 2011 19:13:47 +0000 (12:13 -0700)
Somehow, in the last major change, the constraints that kept the
bencher from trying to read non-existent objects got removed. Put
a check back in the main bench loop to fix that.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/osdc/rados_bencher.h

index 1faa0121f7074877177cc06802516298543abcae..84635e4029591a5817aa0418b868f26dcf3061f8 100644 (file)
@@ -376,7 +376,8 @@ int seq_read_bench(librados::Rados& rados, librados::IoCtx& io_ctx, int seconds_
   char* newName;
   bufferlist *cur_contents;
 
-  while (seconds_to_run && (g_clock.now() < finish_time)) {
+  while (seconds_to_run && (g_clock.now() < finish_time) &&
+      write_data->finished > data->started) {
     dataLock.Lock();
     while (1) {
       for (slot = 0; slot < concurrentios; ++slot) {