From 442b5d5b6a5fab0ac5566a2649d3c99dda575e77 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 18 Jul 2011 13:19:57 -0700 Subject: [PATCH] clien: rados: bench: remove unused variables Signed-off-by: Greg Farnum --- src/client/Client.cc | 16 ---------------- src/osdc/rados_bencher.h | 3 --- src/rados.cc | 5 ++--- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 08d04cd0d38be..e293b3f1127ce 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -996,16 +996,6 @@ int Client::make_request(MetaRequest *request, int use_mds, bufferlist *pdirbl) { - // time the call - utime_t start = ceph_clock_now(cct); - - bool nojournal = false; - int op = request->get_op(); - if (op == CEPH_MDS_OP_GETATTR || - op == CEPH_MDS_OP_READDIR || - op == CEPH_MDS_OP_OPEN) - nojournal = true; - // assign a unique tid tid_t tid = ++last_tid; request->set_tid(tid); @@ -1529,10 +1519,6 @@ bool Client::ms_dispatch(Message *m) void Client::handle_mds_map(MMDSMap* m) { - int frommds = -1; - if (m->get_source().is_mds()) - frommds = m->get_source().num(); - if (m->get_epoch() < mdsmap->get_epoch()) { ldout(cct, 1) << "handle_mds_map epoch " << m->get_epoch() << " is older than our " << mdsmap->get_epoch() << dendl; @@ -3013,7 +2999,6 @@ void Client::handle_cap_grant(Inode *in, int mds, InodeCap *cap, MClientCaps *m) m->get_time_warp_seq(), m->get_ctime(), m->get_mtime(), m->get_atime(), issued); // max_size - bool kick_writers = false; if (cap == in->auth_cap && m->get_max_size() != in->max_size) { ldout(cct, 10) << "max_size " << in->max_size << " -> " << m->get_max_size() << dendl; @@ -3022,7 +3007,6 @@ void Client::handle_cap_grant(Inode *in, int mds, InodeCap *cap, MClientCaps *m) in->wanted_max_size = 0; in->requested_max_size = 0; } - kick_writers = true; } check_cap_issue(in, cap, issued); diff --git a/src/osdc/rados_bencher.h b/src/osdc/rados_bencher.h index 9420fb4cbfc1b..d0be2a735a3d7 100644 --- a/src/osdc/rados_bencher.h +++ b/src/osdc/rados_bencher.h @@ -294,9 +294,6 @@ int write_bench(librados::Rados& rados, librados::IoCtx& io_ctx, << "Min latency: " << data->min_latency << std::endl; //write object size/number data for read benchmarks - int written_objects[2]; - written_objects[0] = data->object_size; - written_objects[1] = data->finished; ::encode(data->object_size, b_write); ::encode(data->finished, b_write); ::encode(getpid(), b_write); diff --git a/src/rados.cc b/src/rados.cc index bbe1b6e8867d7..8d53e085c1214 100644 --- a/src/rados.cc +++ b/src/rados.cc @@ -416,18 +416,17 @@ int LoadGen::bootstrap(const char *pool) void LoadGen::run_op(LoadGenOp *op) { op->completion = rados->aio_create_completion(op, _load_gen_cb, NULL); - int ret; switch (op->type) { case OP_READ: - ret = io_ctx.aio_read(op->oid, op->completion, &op->bl, op->len, op->off); + io_ctx.aio_read(op->oid, op->completion, &op->bl, op->len, op->off); break; case OP_WRITE: bufferptr p = buffer::create(op->len); memset(p.c_str(), 0, op->len); op->bl.push_back(p); - ret = io_ctx.aio_write(op->oid, op->completion, op->bl, op->len, op->off); + io_ctx.aio_write(op->oid, op->completion, op->bl, op->len, op->off); break; } -- 2.39.5