diff options
author | Anuradha Talur <atalur@redhat.com> | 2015-11-12 19:45:10 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-11-30 20:24:05 -0800 |
commit | f2c52ae206f309ec636a299a76849c843c8ab83d (patch) | |
tree | 199509d590bb1c2e2df71a7f06853d001217176d /xlators/cluster/afr/src/afr-self-heal-common.c | |
parent | 0441e50959e9305c5bc4d0af0576593f8755730e (diff) |
cluster/afr : Readdirp performance enhancement
Things done :
1) during lookup and inode_refresh as part of read_txn,
request is sent to detect if heal is required or not.
2) If heal is required, be conservative in setting the
readdirp entry inodes to NULL, otherwise don't be.
3) Self-heal-daemon now crawls both indices/xattrop
and indices/dirty directory while healing.
Change-Id: Ic4a4da63fb7e0726eab5f341a200859b29cf7eb7
BUG: 1250803
Signed-off-by: Anuradha Talur <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/12507
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index c2ea4e96dc9..bd234af789e 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -678,6 +678,8 @@ afr_selfheal_discover_cbk (call_frame_t *frame, void *cookie, xlator_t *this, { afr_local_t *local = NULL; int i = -1; + GF_UNUSED int ret = -1; + int8_t need_heal = 1; local = frame->local; i = (long) cookie; @@ -689,8 +691,13 @@ afr_selfheal_discover_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->replies[i].poststat = *buf; if (parbuf) local->replies[i].postparent = *parbuf; - if (xdata) + if (xdata) { local->replies[i].xdata = dict_ref (xdata); + ret = dict_get_int8 (xdata, "link-count", &need_heal); + local->replies[i].need_heal = need_heal; + } else { + local->replies[i].need_heal = need_heal; + } syncbarrier_wake (&local->barrier); |