]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix data read error injection in bluestore 19866/head
authorSage Weil <sage@redhat.com>
Mon, 8 Jan 2018 22:27:51 +0000 (16:27 -0600)
committerSage Weil <sage@redhat.com>
Tue, 9 Jan 2018 13:20:50 +0000 (07:20 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 7006cc385a50929d14ce7644093b1d2c45d307bb..f12755a550496cf48147aa0fac6ce559078fbfba 100644 (file)
@@ -6627,7 +6627,7 @@ int BlueStore::read(
   }
 
  out:
-  if (r == 0 && _debug_data_eio(oid)) {
+  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 &&