diff options
author | Samuel Just <sam.just@inktank.com> | 2015-03-31 09:45:46 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2015-03-31 09:45:46 -0700 |
commit | 5ad54359a44df207aecbae5cc03426532517ddc0 (patch) | |
tree | 02ddf6445be8a930b887770763a62a491e02c4fa | |
parent | fd26cd1f4e3e76af5413e2e7087ce8d9984922b0 (diff) | |
parent | 8e5d4c66dc99848ac211e2ef790634790c3eb71a (diff) | |
download | ceph-5ad54359a44df207aecbae5cc03426532517ddc0.tar.gz |
Merge pull request #4219 from liewegas/wip-scrub-mtime
osd: do not update mtime when recording digest
Reviewed-by: Samuel Just <sjust@redhat.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 10 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 63d63cb6e9d..ad253c3566e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2234,9 +2234,6 @@ void ReplicatedPG::execute_ctx(OpContext *ctx) ctx->user_at_version = obc->obs.oi.user_version; dout(30) << __func__ << " user_at_version " << ctx->user_at_version << dendl; - // note my stats - utime_t now = ceph_clock_now(cct); - if (op->may_read()) { dout(10) << " taking ondisk_read_lock" << dendl; obc->ondisk_read_lock(); @@ -2360,7 +2357,7 @@ void ReplicatedPG::execute_ctx(OpContext *ctx) repop->src_obc.swap(src_obc); // and src_obc. - issue_repop(repop, now); + issue_repop(repop); eval_repop(repop); repop->put(); @@ -7363,7 +7360,7 @@ void ReplicatedPG::eval_repop(RepGather *repop) } } -void ReplicatedPG::issue_repop(RepGather *repop, utime_t now) +void ReplicatedPG::issue_repop(RepGather *repop) { OpContext *ctx = repop->ctx; const hobject_t& soid = ctx->obs->oi.soid; @@ -7490,7 +7487,7 @@ ReplicatedPG::RepGather *ReplicatedPG::simple_repop_create(ObjectContextRef obc) void ReplicatedPG::simple_repop_submit(RepGather *repop) { dout(20) << __func__ << " " << repop << dendl; - issue_repop(repop, repop->ctx->mtime); + issue_repop(repop); eval_repop(repop); repop->put(); } @@ -11357,6 +11354,7 @@ void ReplicatedPG::_scrub( RepGather *repop = simple_repop_create(obc); OpContext *ctx = repop->ctx; ctx->at_version = get_next_version(); + ctx->mtime = utime_t(); // do not update mtime ctx->new_obs.oi.set_data_digest(p->second.first); ctx->new_obs.oi.set_omap_digest(p->second.second); finish_ctx(ctx, pg_log_entry_t::MODIFY, true, true); diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 6539408e836..da0c75b3e00 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -865,7 +865,7 @@ protected: void repop_all_applied(RepGather *repop); void repop_all_committed(RepGather *repop); void eval_repop(RepGather*); - void issue_repop(RepGather *repop, utime_t now); + void issue_repop(RepGather *repop); RepGather *new_repop(OpContext *ctx, ObjectContextRef obc, ceph_tid_t rep_tid); void remove_repop(RepGather *repop); |