From 6d1b7a107907272a4ff44c0791f0af34bb05f20c Mon Sep 17 00:00:00 2001 From: sageweil Date: Fri, 31 Aug 2007 18:07:41 +0000 Subject: [PATCH] minor cleanups git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1761 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/client/SyntheticClient.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/trunk/ceph/client/SyntheticClient.cc b/trunk/ceph/client/SyntheticClient.cc index 8720f774fa1af..3ec58a8091cef 100644 --- a/trunk/ceph/client/SyntheticClient.cc +++ b/trunk/ceph/client/SyntheticClient.cc @@ -1647,12 +1647,9 @@ int SyntheticClient::create_objects(int nobj, int osize, int inflight) for (int i=start; iosdmap->make_object_layout(oid, pg_t::TYPE_REP, 2); - //oid = object_t(0x1000+i, i); // this magically fixes it.. so it's NOT the oid->pg translation - if (i % inflight == 0) { dout(6) << "create_objects " << i << "/" << (nobj+1) << dendl; } @@ -1742,17 +1739,16 @@ int SyntheticClient::object_rw(int nobj, int osize, int wrpc, // choose object double r = drand48(); // [0..1) - object_t oid; + long o; if (write) { - long o = (long)trunc(pow(r, wskew) * (double)nobj); // exponentially skew towards 0 + o = (long)trunc(pow(r, wskew) * (double)nobj); // exponentially skew towards 0 int pnoremap = (long)(r * 100.0); if (pnoremap >= overlappc) o = (o*prime) % nobj; // remap - oid = object_t(0x1000, o); } else { - long o = (long)trunc(pow(r, rskew) * (double)nobj); // exponentially skew towards 0 - oid = object_t(0x1000, o); + o = (long)trunc(pow(r, rskew) * (double)nobj); // exponentially skew towards 0 } + object_t oid(0x1000, o); ObjectLayout layout = client->osdmap->make_object_layout(oid, pg_t::TYPE_REP, 2); -- 2.39.5