]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os: do not inject read EIO on meta pool objects
authorSage Weil <sage@redhat.com>
Sat, 17 Feb 2018 16:14:10 +0000 (10:14 -0600)
committerSage Weil <sage@redhat.com>
Sat, 17 Feb 2018 16:17:39 +0000 (10:17 -0600)
Avoid EIO on, say, osdmaps until we fix
http://tracker.ceph.com/issues/23029

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/filestore/FileStore.cc

index bd38f32cb1bd16d36b71755220154ba9151218cb..ecd0a1bca71cfdc02486312d7f75d2a3c01407e5 100644 (file)
@@ -6622,8 +6622,10 @@ int BlueStore::read(
   if (r >= 0 && _debug_data_eio(oid)) {
     r = -EIO;
     derr << __func__ << " " << c->cid << " " << oid << " INJECT EIO" << dendl;
-  } else if (cct->_conf->bluestore_debug_random_read_err &&
-    (rand() % (int)(cct->_conf->bluestore_debug_random_read_err * 100.0)) == 0) {
+  } else if (oid.hobj.pool > 0 &&  /* FIXME, see #23029 */
+            cct->_conf->bluestore_debug_random_read_err &&
+            (rand() % (int)(cct->_conf->bluestore_debug_random_read_err *
+                            100.0)) == 0) {
     dout(0) << __func__ << ": inject random EIO" << dendl;
     r = -EIO;
   }
index a3c4557bf13c9e3bc318cca60839ce18372ef0dc..6a0fd8603c6387a8f6bf55b2db43c40201f9d895 100644 (file)
@@ -3334,8 +3334,10 @@ int FileStore::read(
   if (cct->_conf->filestore_debug_inject_read_err &&
       debug_data_eio(oid)) {
     return -EIO;
-  } else if (cct->_conf->filestore_debug_random_read_err &&
-    (rand() % (int)(cct->_conf->filestore_debug_random_read_err * 100.0)) == 0) {
+  } else if (oid.hobj.pool > 0 &&  /* FIXME, see #23029 */
+            cct->_conf->filestore_debug_random_read_err &&
+            (rand() % (int)(cct->_conf->filestore_debug_random_read_err *
+                            100.0)) == 0) {
     dout(0) << __func__ << ": inject random EIO" << dendl;
     return -EIO;
   } else {