]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: rename mds_traceless_replies to mds_inject_traceless_reply_probability
authorGreg Farnum <greg@inktank.com>
Thu, 7 Feb 2013 18:25:33 +0000 (10:25 -0800)
committerGreg Farnum <greg@inktank.com>
Thu, 7 Feb 2013 18:25:33 +0000 (10:25 -0800)
Sage pointed out we should try for consistent naming on these debug
options, and this option is like our other inject_[x] stuff.
While we're here, make the config option comment a bit clearer.

08b82b3ef6b43283e35fd4e56eb5c78651345bea

src/common/config_opts.h
src/mds/Server.cc

index fcd2f8f854094fa8572ce060bb441f2c0336f204..303254e1eb387314bc9517511617a3cc9cf9950f 100644 (file)
@@ -276,8 +276,9 @@ OPTION(mds_kill_export_at, OPT_INT, 0)
 OPTION(mds_kill_import_at, OPT_INT, 0)
 OPTION(mds_kill_link_at, OPT_INT, 0)
 OPTION(mds_kill_rename_at, OPT_INT, 0)
-OPTION(mds_traceless_replies, OPT_DOUBLE, 0) /* [0-1] amount of time MDS
-                               should skip sending the client a trace */
+OPTION(mds_inject_traceless_reply_probability, OPT_DOUBLE, 0) /* percentage
+                               of MDS modify replies to skip sending the
+                               client a trace on [0-1]*/
 OPTION(mds_wipe_sessions, OPT_BOOL, 0)
 OPTION(mds_wipe_ino_prealloc, OPT_BOOL, 0)
 OPTION(mds_skip_ino, OPT_INT, 0)
index 8348be7a68ae63cc32d2d5bbb05938584c0c5d45..2129dac6084a1a788e7e7a5e5b14fa490ca5c0b2 100644 (file)
@@ -980,8 +980,8 @@ void Server::set_trace_dist(Session *session, MClientReply *reply,
                            bool modified)
 {
   // skip doing this for debugging purposes?
-  if (modified && g_conf->mds_traceless_replies &&
-      (rand() % 10000 < g_conf->mds_traceless_replies * 10000.0)) {
+  if (modified && g_conf->mds_inject_traceless_reply_probability &&
+      (rand() % 10000 < g_conf->mds_inject_traceless_reply_probability * 10000.0)) {
     dout(5) << "deliberately skipping trace for " << *reply << dendl;
     return;
   }