From: Kefu Chai Date: Mon, 11 Mar 2019 13:38:21 +0000 (+0800) Subject: crimson/os: use transparent comparator in xattr X-Git-Tag: v15.0.0~186^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c78b36d3a377c4be6967deb656b9c7cfe859340d;p=ceph.git crimson/os: use transparent comparator in xattr so we don't need to allocate a temporary string for looking up OI or SS attribute Signed-off-by: Kefu Chai --- diff --git a/src/crimson/os/cyan_object.h b/src/crimson/os/cyan_object.h index 6846b1a4dc5f..4806589daa95 100644 --- a/src/crimson/os/cyan_object.h +++ b/src/crimson/os/cyan_object.h @@ -16,7 +16,9 @@ struct Object : public boost::intrusive_ref_counter< using bufferlist = ceph::bufferlist; bufferlist data; - std::map xattr; + // use transparent comparator for better performance, see + // https://en.cppreference.com/w/cpp/utility/functional/less_void + std::map> xattr; bufferlist omap_header; std::map omap;