From: Sage Weil Date: Mon, 8 Jan 2018 22:27:51 +0000 (-0600) Subject: os/bluestore: fix data read error injection in bluestore X-Git-Tag: v12.2.6~95^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5fa1a3eb208758cf365be31bf69436fe14ed5e00;p=ceph.git os/bluestore: fix data read error injection in bluestore Signed-off-by: Sage Weil (cherry picked from commit be32d15a04d9d900f604aa366e82791249f1bdb2) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 0932459ca3d..64a7a90c79f 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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 &&