From a5b871330e3aa337eac37b0e441a53f42b152ba6 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Fri, 3 Mar 2017 03:27:45 +0000 Subject: [PATCH] os/filestore/FileStore.cc: remove unneeded loop Signed-off-by: Li Wang --- src/os/filestore/FileStore.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 15169faadfa..caf163a5911 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -1993,8 +1993,7 @@ void FileStore::_do_op(OpSequencer *osr, ThreadPool::TPHandle &handle) if (cct->_conf->filestore_inject_stall) { int orig = cct->_conf->filestore_inject_stall; dout(5) << "_do_op filestore_inject_stall " << orig << ", sleeping" << dendl; - for (int n = 0; n < cct->_conf->filestore_inject_stall; n++) - sleep(1); + sleep(orig); cct->_conf->set_val("filestore_inject_stall", "0"); dout(5) << "_do_op done stalling" << dendl; }