]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: bluestore_inject_wal_apply_delay
authorSage Weil <sage@redhat.com>
Mon, 21 Mar 2016 17:51:43 +0000 (13:51 -0400)
committerSage Weil <sage@redhat.com>
Wed, 30 Mar 2016 15:23:14 +0000 (11:23 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/bluestore/BlueStore.cc

index ff14af2f4e1cf070f4903aaf6c9f809cef0e8339..5d1a6e8c8b08cce6ced22ee572039a8475c3461e 100644 (file)
@@ -966,6 +966,7 @@ OPTION(bluestore_debug_small_allocations, OPT_INT, 0)
 OPTION(bluestore_debug_freelist, OPT_BOOL, false)
 OPTION(bluestore_debug_prefill, OPT_FLOAT, 0)
 OPTION(bluestore_debug_prefragment_max, OPT_INT, 1048576)
+OPTION(bluestore_inject_wal_apply_delay, OPT_FLOAT, 0)
 
 OPTION(kstore_max_ops, OPT_U64, 512)
 OPTION(kstore_max_bytes, OPT_U64, 64*1024*1024)
index afe1e9b1abd04ebb933a1ecdd196e36e1ec895ba..c89cb43339f840386df95ac348bb6807cee935ba 100644 (file)
@@ -3991,6 +3991,16 @@ int BlueStore::_wal_apply(TransContext *txc)
   txc->log_state_latency(logger, l_bluestore_state_wal_queued_lat);
   txc->state = TransContext::STATE_WAL_APPLYING;
 
+  if (g_conf->bluestore_inject_wal_apply_delay) {
+    dout(20) << __func__ << " bluestore_inject_wal_apply_delay "
+            << g_conf->bluestore_inject_wal_apply_delay
+            << dendl;
+    utime_t t;
+    t.set_from_double(g_conf->bluestore_inject_wal_apply_delay);
+    t.sleep();
+    dout(20) << __func__ << " finished sleep" << dendl;
+  }
+
   assert(txc->ioc.pending_aios.empty());
   vector<OnodeRef>::iterator q = txc->wal_op_onodes.begin();
   for (list<bluestore_wal_op_t>::iterator p = wt.ops.begin();