From: Willem Jan Withagen Date: Sun, 1 Apr 2018 12:34:48 +0000 (+0200) Subject: mds: Clang does not (yet) support std::map::merge X-Git-Tag: v13.1.0~377^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3263b90e1f6cc0816495ed6bfb9f324852307dd1;p=ceph.git mds: Clang does not (yet) support std::map::merge @tchaikov found: libc++ still does not support "Splicing Maps and Sets", see https://libcxx.llvm.org/cxx1z_status.html , search for "p0083r3" . Make this case the more explicit coded. Signed-off-by: Willem Jan Withagen --- diff --git a/src/mds/OpenFileTable.cc b/src/mds/OpenFileTable.cc index 4bb52ba0054..cc64d42c523 100644 --- a/src/mds/OpenFileTable.cc +++ b/src/mds/OpenFileTable.cc @@ -12,6 +12,7 @@ * */ +#include "acconfig.h" #include "mds/CInode.h" #include "mds/CDir.h" #include "mds/MDSRank.h" @@ -342,8 +343,13 @@ void OpenFileTable::commit(MDSInternalContextBase *c, uint64_t log_seq, int op_p mds->objecter->mutate(oid, oloc, op, snapc, ceph::real_clock::now(), 0, gather.new_sub()); +#ifdef HAVE_STDLIB_MAP_SPLICING ctl.journaled_update.merge(ctl.to_update); ctl.journaled_remove.merge(ctl.to_remove); +#else + ctl.journaled_update.insert(ctl.to_update.begin(), ctl.to_update.end()); + ctl.journaled_remove.insert(ctl.to_remove.begin(), ctl.to_remove.end()); +#endif ctl.to_update.clear(); ctl.to_remove.clear(); };