]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix data read error injection in bluestore
authorSage Weil <sage@redhat.com>
Mon, 8 Jan 2018 22:27:51 +0000 (16:27 -0600)
committerDavid Zafman <dzafman@redhat.com>
Wed, 23 May 2018 21:14:54 +0000 (14:14 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit be32d15a04d9d900f604aa366e82791249f1bdb2)

src/os/bluestore/BlueStore.cc

index 0932459ca3dcde4cb05d2a2730395ae43dea1d77..64a7a90c79fb043fdf6cef532f4b1bd2af2d9a8d 100644 (file)
@@ -6452,7 +6452,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 &&