From: Josh Durgin Date: Thu, 26 Nov 2015 04:24:30 +0000 (-0800) Subject: test: use sequential journal_tid for object cacher test X-Git-Tag: v10.0.1~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=73aab5e93eb609f42fcc22b6a7f18d5415d02ef7;p=ceph.git test: use sequential journal_tid for object cacher test This matches the real usage by librbd. Fixes: #13877 Signed-off-by: Josh Durgin (cherry picked from commit 9331e031bd2a719463920581a47c13f0606e9971) --- diff --git a/src/test/osdc/object_cacher_stress.cc b/src/test/osdc/object_cacher_stress.cc index 30438b77f2b0..7b04d4ac7309 100644 --- a/src/test/osdc/object_cacher_stress.cc +++ b/src/test/osdc/object_cacher_stress.cc @@ -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);