]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-objectstore-tool: do not check queue_transaction()'s retval
authorKefu Chai <kchai@redhat.com>
Mon, 26 Feb 2018 14:30:59 +0000 (22:30 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 26 Feb 2018 17:08:22 +0000 (01:08 +0800)
it never fails.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/ceph_objectstore_tool.cc

index 2137240bc4f669ca52b0d4bef5beb5428dfdb01c..ef77befeafb0dac3f2ce368c7cab33798ef79252 100644 (file)
@@ -684,13 +684,8 @@ int set_inc_osdmap(ObjectStore *store, epoch_t e, bufferlist& bl, bool force) {
   ObjectStore::Transaction t;
   t.write(coll_t::meta(), inc_oid, 0, bl.length(), bl);
   t.truncate(coll_t::meta(), inc_oid, bl.length());
-  int ret = store->queue_transaction(ch, std::move(t));
-  if (ret) {
-    cerr << "Failed to set inc-osdmap (" << inc_oid << "): " << ret << std::endl;
-  } else {
-    cout << "Wrote inc-osdmap." << inc.epoch << std::endl;
-  }
-  return ret;
+  store->queue_transaction(ch, std::move(t));
+  return 0;
 }
 
 int get_inc_osdmap(ObjectStore *store, epoch_t e, bufferlist& bl)
@@ -732,13 +727,8 @@ int set_osdmap(ObjectStore *store, epoch_t e, bufferlist& bl, bool force) {
   ObjectStore::Transaction t;
   t.write(coll_t::meta(), full_oid, 0, bl.length(), bl);
   t.truncate(coll_t::meta(), full_oid, bl.length());
-  int ret = store->queue_transaction(ch, std::move(t));
-  if (ret) {
-    cerr << "Failed to set osdmap (" << full_oid << "): " << ret << std::endl;
-  } else {
-    cout << "Wrote osdmap." << osdmap.get_epoch() << std::endl;
-  }
-  return ret;
+  store->queue_transaction(ch, std::move(t));
+  return 0;
 }
 
 int get_osdmap(ObjectStore *store, epoch_t e, OSDMap &osdmap, bufferlist& bl)
@@ -2319,13 +2309,7 @@ struct do_fix_lost : public action_on_object_t {
       ObjectStore::Transaction t;
       t.setattr(coll, ghobj, OI_ATTR, bl);
       auto ch = store->open_collection(coll);
-      int r = store->queue_transaction(ch, std::move(t));
-      if (r < 0) {
-       cerr << "Error getting fixing attr on : " << make_pair(coll, ghobj)
-            << ", "
-            << cpp_strerror(r) << std::endl;
-       return r;
-      }
+      store->queue_transaction(ch, std::move(t));
     }
     return 0;
   }