summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-heald.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-04-26 14:28:00 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-08 05:56:11 -0700
commit02f9835d24aa07bd4e9fcb39cb7ace343f31924f (patch)
tree43ff543742f500f24237a84330cb321deca4c288 /xlators/cluster/ec/src/ec-heald.c
parentbf8250bcca7f484269f64b6a73f9330d843b320b (diff)
cluster/ec: Change meaning of trusted.ec.dirty
- With this change, the xattr will represent if the file needs to be healed or not. It will have different values for data/entry and metadata changes. - inode ref leaks and dict_set_dynstr related leaks fixed - Added support for trylock/lock based on heal-cmd execution or not in data heal. - Made fixes to pass regression runs Change-Id: I9d8def4c2badde18a76b7898816fecfac113737a BUG: 1215265 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10385 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heald.c')
-rw-r--r--xlators/cluster/ec/src/ec-heald.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c
index 53b3996590c..a7cf8f7bd30 100644
--- a/xlators/cluster/ec/src/ec-heald.c
+++ b/xlators/cluster/ec/src/ec-heald.c
@@ -18,7 +18,7 @@
#include "syncop-utils.h"
#include "protocol-common.h"
-#define SHD_INODE_LRU_LIMIT 2048
+#define SHD_INODE_LRU_LIMIT 10
#define ASSERT_LOCAL(this, healer) \
do { \
if (!ec_shd_is_subvol_local (this, healer->subvol)) { \
@@ -224,8 +224,8 @@ ec_shd_index_heal (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
void *data)
{
struct subvol_healer *healer = data;
- ec_t *ec = NULL;
- loc_t loc = {0};
+ ec_t *ec = NULL;
+ loc_t loc = {0};
int ret = 0;
ec = healer->this->private;
@@ -254,6 +254,8 @@ ec_shd_index_heal (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
ec_shd_selfheal (healer, healer->subvol, &loc);
out:
+ if (loc.inode)
+ inode_forget (loc.inode, 0);
loc_wipe (&loc);
return 0;
@@ -280,7 +282,7 @@ ec_shd_index_sweep (struct subvol_healer *healer)
ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_AFR_SELF_HEALD,
healer, ec_shd_index_heal);
- inode_forget (loc.inode, 1);
+ inode_forget (loc.inode, 0);
loc_wipe (&loc);
return ret;
@@ -318,10 +320,12 @@ ec_shd_full_heal (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
ec_shd_selfheal (healer, healer->subvol, &loc);
- loc_wipe (&loc);
ret = 0;
out:
+ if (loc.inode)
+ inode_forget (loc.inode, 0);
+ loc_wipe (&loc);
return ret;
}