From 9331e031bd2a719463920581a47c13f0606e9971 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 25 Nov 2015 20:24:30 -0800 Subject: [PATCH] test: use sequential journal_tid for object cacher test This matches the real usage by librbd. Fixes: #13877 Signed-off-by: Josh Durgin --- src/test/osdc/object_cacher_stress.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.3