diff options
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 28 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.h | 2 |
3 files changed, 27 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 81762320f55..3b6a0201670 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1119,6 +1119,8 @@ char *set_option_list[] = { "io-cache", "quick-read", "stat-prefetch", + "latency-measurement", + "dump-fd-stats", }; diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 9609342b67d..75f728c6343 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -308,6 +308,16 @@ set_default_options (dict_t *dict, char *volname) if (ret) goto out; + ret = set_xlator_option (dict, VOLGEN_IOS_OPTION_DUMP_FD_STATS, + "no"); + if (ret) + goto out; + + ret = set_xlator_option (dict, VOLGEN_IOS_OPTION_MEASURE_LATENCY, + "no"); + if (ret) + goto out; + ret = 0; out: @@ -1600,12 +1610,14 @@ __write_iostats_xlator (FILE *file, dict_t *dict, char *subvolume) { char *volname = NULL; + char *dumpfd = NULL; + char *latency = NULL; int ret = -1; const char *iostats_str = "volume %s\n" " type debug/io-stats\n" - " # option dump-fd-stats enable\n" - " # option latency-measurement enable\n" + " option dump-fd-stats %s\n" + " option latency-measurement %s\n" " subvolumes %s\n" "end-volume\n\n"; @@ -1614,9 +1626,15 @@ __write_iostats_xlator (FILE *file, dict_t *dict, goto out; } - fprintf (file, iostats_str, - volname, - subvolume); + ret = dict_get_str (dict, VOLGEN_IOS_OPTION_DUMP_FD_STATS, &dumpfd); + if (ret) + goto out; + + ret = dict_get_str (dict, VOLGEN_IOS_OPTION_MEASURE_LATENCY, &latency); + if (ret) + goto out; + + fprintf (file, iostats_str, volname, dumpfd, latency, subvolume); ret = 0; diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.h b/xlators/mgmt/glusterd/src/glusterd-volgen.h index a93bac6751a..2f0ab8bdbd0 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.h +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.h @@ -125,6 +125,8 @@ #define VOLGEN_QR_OPTION_CACHESIZE "volgen_qr_option_cachesize" #define VOLGEN_QR_OPTION_MAXFILESIZE "volgen_qr_option_maxfilesize" +#define VOLGEN_IOS_OPTION_DUMP_FD_STATS "dump-fd-stats" +#define VOLGEN_IOS_OPTION_MEASURE_LATENCY "latency-measurement" int glusterd_create_volfiles (glusterd_volinfo_t *volinfo); |