From f6618acd4f7642dab19445e35cf2c7fbc8244a5e Mon Sep 17 00:00:00 2001 From: Joseph Fernandes Date: Tue, 4 Aug 2015 20:38:06 +0530 Subject: tier/ctr: CTR DB named lookup heal of cold tier during attach tier Heal hardlink in the db for already existing data in the cold tier during attach tier. i.e during fix layout do lookup to files in the cold tier. CTR xlator on the brick/server side does db update/insert of the hardlink on a namelookup. Currently the namedlookup is done synchronous to the fixlayout that is triggered by attach tier. This is not performant, adding more time to fixlayout. The performant approach is record the hardlinks on a compressed datastore and then do the namelookup asynchronously later, giving the ctr db eventual consistency Change-Id: I4ffc337fffe7d447804786851a9183a51b5044a9 BUG: 1252586 Signed-off-by: Joseph Fernandes Reviewed-on: http://review.gluster.org/11828 Tested-by: Gluster Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/features/changetimerecorder/src/changetimerecorder.c | 1 - xlators/features/changetimerecorder/src/ctr-helper.h | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators/features/changetimerecorder') diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c index 89445b47bca..7305f68c4c5 100644 --- a/xlators/features/changetimerecorder/src/changetimerecorder.c +++ b/xlators/features/changetimerecorder/src/changetimerecorder.c @@ -214,7 +214,6 @@ ctr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, gf_boolean_t _is_heal_needed = _gf_false; CTR_IS_DISABLED_THEN_GOTO(this, out); - CTR_IF_INTERNAL_FOP_THEN_GOTO (frame, dict, out); /* if the lookup failed lookup dont do anything*/ if (op_ret == -1) { diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h index dbad3029462..4f650350c94 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.h +++ b/xlators/features/changetimerecorder/src/ctr-helper.h @@ -284,10 +284,12 @@ do {\ * */ #define CTR_IS_INTERNAL_FOP(frame, dict)\ (AFR_SELF_HEAL_FOP (frame) \ - || REBALANCE_FOP (frame) \ - || TIER_REBALANCE_FOP (frame) \ + || (REBALANCE_FOP (frame) && dict && \ + !dict_get (dict, CTR_ATTACH_TIER_LOOKUP)) \ + || (TIER_REBALANCE_FOP (frame) && dict && \ + !dict_get (dict, CTR_ATTACH_TIER_LOOKUP)) \ || (dict && \ - dict_get (dict, GLUSTERFS_INTERNAL_FOP_KEY))) + dict_get (dict, GLUSTERFS_INTERNAL_FOP_KEY))) /** * ignore internal fops for all clients except AFR self-heal daemon -- cgit