]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: add failure injection for not advancing oldest_tid 4386/head
authorYan, Zheng <zyan@redhat.com>
Tue, 21 Apr 2015 12:20:55 +0000 (20:20 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 21 Apr 2015 15:14:22 +0000 (23:14 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/client/Client.cc
src/common/config_opts.h

index 2eb4a4801f03b9f2ffb8e5543d2cd057f0a4b8a9..f77255578a6c90f14e440df9de1197d006238bd2 100644 (file)
@@ -1471,10 +1471,15 @@ int Client::make_request(MetaRequest *request,
   request->set_caller_uid(uid);
   request->set_caller_gid(gid);
 
-  if (!mds_requests.empty()) 
-    request->set_oldest_client_tid(mds_requests.begin()->first);
-  else
-    request->set_oldest_client_tid(tid); // this one is the oldest.
+  if (cct->_conf->client_inject_fixed_oldest_tid) {
+    ldout(cct, 20) << __func__ << " injecting fixed oldest_client_tid(1)" << dendl;
+    request->set_oldest_client_tid(1);
+  } else {
+    if (!mds_requests.empty())
+      request->set_oldest_client_tid(mds_requests.begin()->first);
+    else
+      request->set_oldest_client_tid(tid); // this one is the oldest.
+  }
 
   // hack target mds?
   if (use_mds >= 0)
index 60afe9a98dc49d8593a0955e14e8c60969535772..0e623a61b3afa831ced15072cf31900c524dcddc 100644 (file)
@@ -320,6 +320,7 @@ OPTION(client_debug_force_sync_read, OPT_BOOL, false)     // always read synchro
 OPTION(client_debug_inject_tick_delay, OPT_INT, 0) // delay the client tick for a number of seconds
 OPTION(client_max_inline_size, OPT_U64, 4096)
 OPTION(client_inject_release_failure, OPT_BOOL, false)  // synthetic client bug for testing
+OPTION(client_inject_fixed_oldest_tid, OPT_BOOL, false)  // synthetic client bug for testing
 // note: the max amount of "in flight" dirty data is roughly (max - target)
 OPTION(fuse_use_invalidate_cb, OPT_BOOL, false) // use fuse 2.8+ invalidate callback to keep page cache consistent
 OPTION(fuse_allow_other, OPT_BOOL, true)