Skip to content

Commit

Permalink
Merge pull request #7069 from wonzhq/recovery-cache-hint
Browse files Browse the repository at this point in the history
osd: add cache hint when pushing raw clone during recovery

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jan 13, 2016
2 parents 13b789c + 6f3f9d3 commit 12f1b0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/osd/ReplicatedBackend.cc
Expand Up @@ -1577,14 +1577,14 @@ void ReplicatedBackend::prep_push_to_replica(
// we need the head (and current SnapSet) locally to do that.
if (get_parent()->get_local_missing().is_missing(head)) {
dout(15) << "push_to_replica missing head " << head << ", pushing raw clone" << dendl;
return prep_push(obc, soid, peer, pop);
return prep_push(obc, soid, peer, pop, cache_dont_need);
}
hobject_t snapdir = head;
snapdir.snap = CEPH_SNAPDIR;
if (get_parent()->get_local_missing().is_missing(snapdir)) {
dout(15) << "push_to_replica missing snapdir " << snapdir
<< ", pushing raw clone" << dendl;
return prep_push(obc, soid, peer, pop);
return prep_push(obc, soid, peer, pop, cache_dont_need);
}

SnapSetContext *ssc = obc->ssc;
Expand Down Expand Up @@ -1618,7 +1618,7 @@ void ReplicatedBackend::prep_push_to_replica(

void ReplicatedBackend::prep_push(ObjectContextRef obc,
const hobject_t& soid, pg_shard_t peer,
PushOp *pop)
PushOp *pop, bool cache_dont_need)
{
interval_set<uint64_t> data_subset;
if (obc->obs.oi.size)
Expand All @@ -1627,7 +1627,7 @@ void ReplicatedBackend::prep_push(ObjectContextRef obc,

prep_push(obc, soid, peer,
obc->obs.oi.version, data_subset, clone_subsets,
pop);
pop, cache_dont_need);
}

void ReplicatedBackend::prep_push(
Expand Down
3 changes: 2 additions & 1 deletion src/osd/ReplicatedBackend.h
Expand Up @@ -298,7 +298,8 @@ class ReplicatedBackend : public PGBackend {
PushOp *pop, bool cache_dont_need = true);
void prep_push(ObjectContextRef obc,
const hobject_t& oid, pg_shard_t dest,
PushOp *op);
PushOp *op,
bool cache_dont_need);
void prep_push(ObjectContextRef obc,
const hobject_t& soid, pg_shard_t peer,
eversion_t version,
Expand Down

0 comments on commit 12f1b0f

Please sign in to comment.