diff options
Diffstat (limited to 'xlators')
5 files changed, 25 insertions, 1 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c index 42470a92ef9..fd57a445e08 100644 --- a/xlators/features/changetimerecorder/src/changetimerecorder.c +++ b/xlators/features/changetimerecorder/src/changetimerecorder.c @@ -958,6 +958,9 @@ reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("record-counters", _priv->ctr_record_counter, options, bool, out); + GF_OPTION_RECONF ("ctr_link_consistency", _priv->ctr_link_consistency, + options, bool, out); + GF_OPTION_RECONF ("record-exit", _priv->ctr_record_unwind, options, bool, out); @@ -1154,6 +1157,11 @@ struct volume_options options[] = { .value = {"on", "off"}, .default_value = "off" }, + { .key = {"ctr_link_consistency"}, + .type = GF_OPTION_TYPE_BOOL, + .value = {"on", "off"}, + .default_value = "off" + }, { .key = {"hot-brick"}, .type = GF_OPTION_TYPE_BOOL, .value = {"on", "off"}, diff --git a/xlators/features/changetimerecorder/src/ctr-helper.c b/xlators/features/changetimerecorder/src/ctr-helper.c index da5a3deed96..a2e2569818d 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.c +++ b/xlators/features/changetimerecorder/src/ctr-helper.c @@ -97,6 +97,7 @@ fill_db_record_for_wind (xlator_t *this, ctr_wtime = &CTR_DB_REC(ctr_local).gfdb_wind_change_time; CTR_DB_REC(ctr_local).gfdb_fop_path = ctr_inode_cx->fop_path; CTR_DB_REC(ctr_local).gfdb_fop_type = ctr_inode_cx->fop_type; + CTR_DB_REC(ctr_local).link_consistency = _priv->ctr_link_consistency; ret = gettimeofday (ctr_wtime, NULL); if (ret) { @@ -265,6 +266,10 @@ int extract_ctr_options (xlator_t *this, gf_ctr_private_t *_priv) { GF_OPTION_INIT ("record-counters", _priv->ctr_record_counter, bool, out); + /*Extract flag for link consistency*/ + GF_OPTION_INIT ("ctr_link_consistency", _priv->ctr_link_consistency, + bool, out); + /*Extract flag for hot tier brick*/ GF_OPTION_INIT ("hot-brick", _priv->ctr_hot_brick, bool, out); diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h index 6f4ad5cbe7a..85ee872fa33 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.h +++ b/xlators/features/changetimerecorder/src/ctr-helper.h @@ -37,6 +37,7 @@ typedef struct gf_ctr_private { gf_boolean_t ctr_record_wind; gf_boolean_t ctr_record_unwind; gf_boolean_t ctr_record_counter; + gf_boolean_t ctr_link_consistency; gfdb_db_type_t gfdb_db_type; gfdb_sync_type_t gfdb_sync_type; gfdb_conn_node_t *_db_conn; @@ -380,6 +381,7 @@ ctr_insert_wind (call_frame_t *frame, "WIND: Error filling ctr local"); goto out; } + /*Insert the db record*/ ret = insert_record (_priv->_db_conn, &ctr_local->gfdb_db_record); diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index b6c0e4926d3..f8050c87124 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1689,6 +1689,10 @@ brick_graph_add_changetimerecorder (volgen_graph_t *graph, if (ret) goto out; + ret = xlator_set_option (xl, "ctr_link_consistency", "off"); + if (ret) + goto out; + ret = xlator_set_option (xl, "record-entry", "on"); if (ret) goto out; diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 17f34e6f86d..c57840f0fde 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1730,8 +1730,13 @@ struct volopt_map_entry glusterd_volopt_map[] = { .option = "record-counters", .op_version = GD_OP_VERSION_3_7_0 }, + { .key = "features.ctr_link_consistency", + .voltype = "features/changetimerecorder", + .value = "off", + .option = "ctr_link_consistency", + .op_version = GD_OP_VERSION_3_7_0 + }, #endif /* USE_GFDB */ - { .key = "locks.trace", .voltype = "features/locks", .type = NO_DOC, |