From: Sage Weil Date: Mon, 12 Feb 2018 19:45:55 +0000 (-0600) Subject: os/filestore: wait_for_apply on get_omap_iterator X-Git-Tag: v13.0.2~222^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=98b4e900df9a9123d73e405793b58a17890bf6da;p=ceph.git os/filestore: wait_for_apply on get_omap_iterator Note that we don't need to worry about the internal get_omap_iterator callrs (e.g., omap_rmkeyrange) because the apply thread does these ops sequentially and in order. Signed-off-by: Sage Weil --- diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 29eb204833d3..a3c4557bf13c 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -5247,6 +5247,15 @@ int FileStore::omap_check_keys(CollectionHandle& ch, const ghobject_t &hoid, return 0; } +ObjectMap::ObjectMapIterator FileStore::get_omap_iterator( + CollectionHandle& ch, + const ghobject_t &oid) +{ + auto osr = static_cast(ch.get()); + osr->wait_for_apply(oid); + return get_omap_iterator(ch->cid, oid); +} + ObjectMap::ObjectMapIterator FileStore::get_omap_iterator(const coll_t& _c, const ghobject_t &hoid) { diff --git a/src/os/filestore/FileStore.h b/src/os/filestore/FileStore.h index efe717811117..9aeaefa7f3c5 100644 --- a/src/os/filestore/FileStore.h +++ b/src/os/filestore/FileStore.h @@ -734,9 +734,7 @@ public: int omap_check_keys(CollectionHandle& c, const ghobject_t &oid, const set &keys, set *out) override; using ObjectStore::get_omap_iterator; - ObjectMap::ObjectMapIterator get_omap_iterator(CollectionHandle& c, const ghobject_t &oid) override { - return get_omap_iterator(c->cid, oid); - } + ObjectMap::ObjectMapIterator get_omap_iterator(CollectionHandle& c, const ghobject_t &oid) override; ObjectMap::ObjectMapIterator get_omap_iterator(const coll_t& cid, const ghobject_t &oid); int _create_collection(const coll_t& c, int bits,