diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-04-18 17:30:39 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-05-07 00:51:40 -0700 |
commit | c4dadc74fd1d1188f123eae7f2b6d6f5232e2a0f (patch) | |
tree | 5ca66ff4466a58d7038d7fbdf8587847a4c85645 /xlators/cluster/afr/src/afr-self-heald.c | |
parent | ca5861fdf9fdf9c29523893418312bdf1796c28e (diff) | |
download | glusterfs-c4dadc74fd1d1188f123eae7f2b6d6f5232e2a0f.tar.gz glusterfs-c4dadc74fd1d1188f123eae7f2b6d6f5232e2a0f.tar.xz glusterfs-c4dadc74fd1d1188f123eae7f2b6d6f5232e2a0f.zip |
Self-heald: Dump the event history completely
Change-Id: Icf08ef1752795276f88c343d1d74af104095c6cb
BUG: 796579
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3276
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heald.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heald.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c index 617711d0de..7db733fcd4 100644 --- a/xlators/cluster/afr/src/afr-self-heald.c +++ b/xlators/cluster/afr/src/afr-self-heald.c @@ -41,7 +41,6 @@ typedef enum { typedef struct shd_dump { dict_t *dict; - time_t sh_time; xlator_t *this; int child; } shd_dump_t; @@ -219,23 +218,20 @@ _add_event_to_dict (circular_buffer_t *cb, void *data) shd_event = cb->data; if (shd_event->child != dump_data->child) goto out; - if (cb->tv.tv_sec >= dump_data->sh_time) - ret = _add_str_to_dict (dump_data->this, dump_data->dict, - dump_data->child, shd_event->path, - _gf_false); + ret = _add_str_to_dict (dump_data->this, dump_data->dict, + dump_data->child, shd_event->path, + _gf_false); out: return ret; } int -_add_eh_to_dict (xlator_t *this, eh_t *eh, dict_t *dict, time_t sh_time, - int child) +_add_eh_to_dict (xlator_t *this, eh_t *eh, dict_t *dict, int child) { shd_dump_t dump_data = {0}; dump_data.this = this; dump_data.dict = dict; - dump_data.sh_time = sh_time; dump_data.child = child; eh_dump (eh, &dump_data, _add_event_to_dict); return 0; @@ -385,13 +381,6 @@ afr_crawl_done (int ret, call_frame_t *sync_frame, void *data) void _do_self_heal_on_subvol (xlator_t *this, int child, afr_crawl_type_t crawl) { - afr_private_t *priv = NULL; - afr_self_heald_t *shd = NULL; - - priv = this->private; - shd = &priv->shd; - - time (&shd->sh_times[child]); afr_start_crawl (this, child, crawl, _self_heal_entry, NULL, _gf_true, STOP_CRAWL_ON_SINGLE_SUBVOL, afr_crawl_done); @@ -525,7 +514,7 @@ _add_all_subvols_eh_to_dict (xlator_t *this, eh_t *eh, dict_t *dict) for (i = 0; i < priv->child_count; i++) { if (shd->pos[i] != AFR_POS_LOCAL) continue; - _add_eh_to_dict (this, eh, dict, shd->sh_times[i], i); + _add_eh_to_dict (this, eh, dict, i); } return 0; } |