From: Samuel Just Date: Fri, 25 Sep 2015 20:52:53 +0000 (-0700) Subject: ECBackend::handle_recovery_read_complete: do not expose the hash_info when getting... X-Git-Tag: v9.1.0~47^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6054%2Fhead;p=ceph.git ECBackend::handle_recovery_read_complete: do not expose the hash_info when getting the obc 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 --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 558989756f9..d6b95a5abed 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -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 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; }