]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: use sequential journal_tid for object cacher test 6710/head
authorJosh Durgin <jdurgin@redhat.com>
Thu, 26 Nov 2015 04:24:30 +0000 (20:24 -0800)
committerJosh Durgin <jdurgin@redhat.com>
Thu, 26 Nov 2015 04:24:30 +0000 (20:24 -0800)
This matches the real usage by librbd.

Fixes: #13877
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/test/osdc/object_cacher_stress.cc

index 30438b77f2b0fd1677261138079a796fad309379..7b04d4ac73095420c3aca247ba4bf22fd1ca3b45 100644 (file)
@@ -72,6 +72,7 @@ int stress_test(uint64_t num_ops, uint64_t num_objs,
   SnapContext snapc;
   ceph::buffer::ptr bp(max_op_len);
   ceph::bufferlist bl;
+  uint64_t journal_tid = 0;
   bp.zero();
   bl.append(bp);
 
@@ -110,7 +111,7 @@ int stress_test(uint64_t num_ops, uint64_t num_objs,
        assert(r == 0);
     } else {
       ObjectCacher::OSDWrite *wr = obc.prepare_write(snapc, bl, utime_t(), 0,
-                                                     random());
+                                                     ++journal_tid);
       wr->extents.push_back(op->extent);
       lock.Lock();
       obc.writex(wr, &object_set, NULL);