]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Remove m_eio in KeyValueStore
authorHaomai Wang <haomaiwang@gmail.com>
Fri, 21 Feb 2014 14:10:17 +0000 (22:10 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Sat, 22 Feb 2014 13:05:01 +0000 (21:05 +0800)
KeyValueStore use kv backend to detect errors and nearly can't know the actual
reason for error.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/os/KeyValueStore.cc
src/os/KeyValueStore.h

index 99ea59852ce8688c233b6033f6bd04e600fe2cd2..7156044f162d5d07237f01d42e8f507744635abe 100644 (file)
@@ -509,7 +509,6 @@ KeyValueStore::KeyValueStore(const std::string &base,
   read_error_lock("KeyValueStore::read_error_lock"),
   m_keyvaluestore_queue_max_ops(g_conf->keyvaluestore_queue_max_ops),
   m_keyvaluestore_queue_max_bytes(g_conf->keyvaluestore_queue_max_bytes),
-  m_fail_eio(g_conf->filestore_fail_eio),
   do_update(do_update)
 {
   ostringstream oss;
@@ -550,7 +549,6 @@ int KeyValueStore::statfs(struct statfs *buf)
 {
   if (::statfs(basedir.c_str(), buf) < 0) {
     int r = -errno;
-    assert(!m_fail_eio || r != -EIO);
     return r;
   }
   return 0;
@@ -891,7 +889,6 @@ close_fsid_fd:
   TEMP_FAILURE_RETRY(::close(fsid_fd));
   fsid_fd = -1;
 done:
-  assert(!m_fail_eio || ret != -EIO);
   return ret;
 }
 
@@ -2128,7 +2125,6 @@ int KeyValueStore::_rmattrs(coll_t cid, const ghobject_t& oid,
   r = backend->get_keys_with_header(*header, OBJECT_XATTR, &attrs);
   if (r < 0 && r != -ENOENT) {
     dout(10) << __func__ << " could not get attrs r = " << r << dendl;
-    assert(!m_fail_eio || r != -EIO);
     return r;
   }
 
@@ -2707,7 +2703,6 @@ int KeyValueStore::omap_get_header(coll_t c, const ghobject_t &hoid,
   keys.insert(OBJECT_OMAP_HEADER_KEY);
   int r = backend->get_values(c, hoid, OBJECT_OMAP_HEADER, keys, &got);
   if (r < 0 && r != -ENOENT) {
-    assert(allow_eio || !m_fail_eio || r != -EIO);
     dout(10) << __func__ << " err r =" << r << dendl;
     return r;
   }
@@ -2726,7 +2721,6 @@ int KeyValueStore::omap_get_keys(coll_t c, const ghobject_t &hoid, set<string> *
 
   int r = backend->get_keys(c, hoid, OBJECT_OMAP, keys);
   if (r < 0 && r != -ENOENT) {
-    assert(!m_fail_eio || r != -EIO);
     return r;
   }
   return 0;
@@ -2740,7 +2734,6 @@ int KeyValueStore::omap_get_values(coll_t c, const ghobject_t &hoid,
 
   int r = backend->get_values(c, hoid, OBJECT_OMAP, keys, out);
   if (r < 0 && r != -ENOENT) {
-    assert(!m_fail_eio || r != -EIO);
     return r;
   }
   return 0;
@@ -2753,7 +2746,6 @@ int KeyValueStore::omap_check_keys(coll_t c, const ghobject_t &hoid,
 
   int r = backend->check_keys(c, hoid, OBJECT_OMAP, keys, out);
   if (r < 0 && r != -ENOENT) {
-    assert(!m_fail_eio || r != -EIO);
     return r;
   }
   return 0;
@@ -2784,7 +2776,6 @@ int KeyValueStore::_omap_clear(coll_t cid, const ghobject_t &hoid,
   r = backend->get_keys_with_header(*header, OBJECT_OMAP, &keys);
   if (r < 0 && r != -ENOENT) {
     dout(10) << __func__ << " could not get omap_keys r = " << r << dendl;
-    assert(!m_fail_eio || r != -EIO);
     return r;
   }
 
index 748fd59813301af90b62577036d3c4e38398718f..a169e07eab935ac628e6d44ced0ad5cc311f6327 100644 (file)
@@ -570,7 +570,6 @@ class KeyValueStore : public ObjectStore,
   std::string m_osd_rollback_to_cluster_snap;
   int m_keyvaluestore_queue_max_ops;
   int m_keyvaluestore_queue_max_bytes;
-  bool m_fail_eio;
 
   int do_update;