From: David Zafman Date: Mon, 22 Jun 2015 18:15:58 +0000 (-0700) Subject: tools: Don't export temporary objects until we have persistent-temp objects X-Git-Tag: v9.0.3~52^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4fcf5dd370e8cfac75fadbf709a785053eb26ad9;p=ceph.git tools: Don't export temporary objects until we have persistent-temp objects Signed-off-by: David Zafman --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 43f6b2224640..67cce7fa908a 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -699,7 +699,8 @@ int ObjectStoreTool::export_files(ObjectStore *store, coll_t coll) for (vector::iterator i = objects.begin(); i != objects.end(); ++i) { - if (i->is_pgmeta()) { + assert(!i->hobj.is_meta()); + if (i->is_pgmeta() || i->hobj.is_temp()) { continue; } r = export_file(store, coll, *i); @@ -872,6 +873,10 @@ int ObjectStoreTool::get_object(ObjectStore *store, coll_t coll, coll.is_pg_prefix(&pg); SnapMapper mapper(&driver, 0, 0, 0, pg.shard); + if (ob.hoid.hobj.is_temp()) { + cerr << "ERROR: Export contains temporary object '" << ob.hoid << "'" << std::endl; + return -EFAULT; + } assert(g_ceph_context); if (ob.hoid.hobj.nspace != g_ceph_context->_conf->osd_hit_set_namespace) { object_t oid = ob.hoid.hobj.oid;