]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add cache hint when pushing raw clone during recovery 7069/head
authorZhiqiang Wang <wonzhq@hotmail.com>
Tue, 29 Dec 2015 05:41:55 +0000 (13:41 +0800)
committerZhiqiang Wang <wonzhq@hotmail.com>
Tue, 29 Dec 2015 05:41:55 +0000 (13:41 +0800)
When head or snapdir is missing on the primary, we push raw clone to the
replicas. Set cache hint also in this case.

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
src/osd/ReplicatedBackend.cc
src/osd/ReplicatedBackend.h

index 6d33c01b94829c6420e793b7999d8b5595da3e12..1ec8cbe571d6895a497999ba33654a951e4c5af9 100644 (file)
@@ -1571,14 +1571,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;
@@ -1612,7 +1612,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)
@@ -1621,7 +1621,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(
index a36007d42c287fc6f0121d58754d8dc74e003a5d..7a1b72aeb963e9545d70fb4e3c11d3edbbd2a410 100644 (file)
@@ -298,7 +298,8 @@ private:
     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,