]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ECBackend::handle_recovery_read_complete: do not expose the hash_info when getting... 6054/head
authorSamuel Just <sjust@redhat.com>
Fri, 25 Sep 2015 20:52:53 +0000 (13:52 -0700)
committerDavid Zafman <dzafman@redhat.com>
Mon, 28 Sep 2015 18:33:11 +0000 (11:33 -0700)
Aside from expose an ECBackend internal detail, it causes ReplicatedPG
to cache the value causing trouble with WRITEFULL.

Partially fixes: #12983
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ECBackend.cc

index 558989756f9c484d2c778759cf154d1a093a3d25..d6b95a5abed614f841b913360c95093020a72d43 100644 (file)
@@ -383,7 +383,12 @@ void ECBackend::handle_recovery_read_complete(
            ++it) {
         it->second.rebuild();
       }
-      op.obc = get_parent()->get_obc(hoid, op.xattrs);
+      // Need to remove ECUtil::get_hinfo_key() since it should not leak out
+      // of the backend (see bug #12983)
+      map<string, bufferlist> sanitized_attrs(op.xattrs);
+      sanitized_attrs.erase(ECUtil::get_hinfo_key());
+      op.obc = get_parent()->get_obc(hoid, sanitized_attrs);
+      assert(op.obc);
       op.recovery_info.size = op.obc->obs.oi.size;
       op.recovery_info.oi = op.obc->obs.oi;
     }