Skip to content

Commit

Permalink
tools: Don't export temporary objects until we have persistent-temp o…
Browse files Browse the repository at this point in the history
…bjects

Signed-off-by: David Zafman <dzafman@redhat.com>
  • Loading branch information
dzafman authored and liewegas committed Jul 10, 2015
1 parent fb22a9f commit 4fcf5dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tools/ceph_objectstore_tool.cc
Expand Up @@ -699,7 +699,8 @@ int ObjectStoreTool::export_files(ObjectStore *store, coll_t coll)
for (vector<ghobject_t>::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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4fcf5dd

Please sign in to comment.