diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-04-26 14:28:00 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-05-08 20:12:31 -0700 |
commit | a327b9fa9d50a66e7bb3a887ac569be914132d10 (patch) | |
tree | 9e810ad7553f3512383e14ddcf35a7a7ceeadb52 /xlators/cluster/ec/src/ec-heald.c | |
parent | f54b232b3cc61ee9ca76288958537b53de64de53 (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: 1216303
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10385
Reviewed-on: http://review.gluster.org/10693
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heald.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-heald.c | 14 |
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; } |