diff options
author | Joseph Fernandes <josferna@redhat.com> | 2015-04-09 15:07:54 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-05-01 09:10:30 -0700 |
commit | 4d118cb5ee99b8401d70678fc3b3576ad938999d (patch) | |
tree | ba69360a1d9f416193916a84676cc43a4d3c64ed /xlators/mgmt/glusterd | |
parent | cfb9ea4dc68440a18b7f07422901a715b00776f0 (diff) |
ctr/libgfdb: Performance enhancer for unlink/create/rename/link fops
1) ctr_link_consistency option for ctr xaltor is provided so that
the user can choose to switch it on or off.
/* For link consistency we do a double update i.e mark the link
* during the wind and during the unwind we update/delete the link.
* This has a performance hit. We give a choice here whether we need
* link consistency to be spoton or not using link_consistency flag.
* This will have only one link update */
2) In delete the wind time recording is moved to unwind path.
/* Special performance case:
* Updating wind time in unwind for delete. This is done here
* as in the wind path we will not know whether its the last
* link or not. For a last link there is not use to update any
* wind or unwind time!*/
Change-Id: I209472fb816f939db4a868b97ba053b028f17ea6
BUG: 1217786
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/10170
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 7 |
2 files changed, 10 insertions, 1 deletions
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, |