summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-12-30 10:17:00 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-01-30 18:27:07 -0800
commit4a9e1a10b454751f70bad36b49fc201a98f314be (patch)
tree5b72bac9a978daf3dbc8392bd3a95762e5b8c03d
parentc4d7c50a7354ad92e76ea72fccc86e0732e75c49 (diff)
cluster/ec: Create this->itable in all cases
Problem: glfsheal operates based on mount's volfile which doesn't have iamshd flag due to which this->itable is NULL, this leads to "inode not found" logs in glfsheal logs. Fix: Ec only allocates itable with 10 inodes, so allocating this->itable in all cases in init. >Change-Id: I01d3c05e93a17007a4716a2d6f392d2aa306a34b >BUG: 1294743 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13112 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >(cherry picked from commit 080ddb79d8805253a7f4274606351570faae1add) Change-Id: I4fb624fc26d47128221322da077d04b12add6452 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> BUG: 1302943 Reviewed-on: http://review.gluster.org/13312 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
-rw-r--r--xlators/cluster/ec/src/ec-heald.c5
-rw-r--r--xlators/cluster/ec/src/ec.c4
-rw-r--r--xlators/cluster/ec/src/ec.h1
3 files changed, 5 insertions, 5 deletions
diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c
index 20724c7..0c84a89 100644
--- a/xlators/cluster/ec/src/ec-heald.c
+++ b/xlators/cluster/ec/src/ec-heald.c
@@ -19,7 +19,6 @@
#include "syncop-utils.h"
#include "protocol-common.h"
-#define SHD_INODE_LRU_LIMIT 10
#define ASSERT_LOCAL(this, healer) \
do { \
if (!ec_shd_is_subvol_local (this, healer->subvol)) { \
@@ -513,10 +512,6 @@ ec_selfheal_daemon_init (xlator_t *this)
ec = this->private;
shd = &ec->shd;
- this->itable = inode_table_new (SHD_INODE_LRU_LIMIT, this);
- if (!this->itable)
- goto out;
-
shd->index_healers = GF_CALLOC (sizeof(*shd->index_healers),
ec->nodes,
ec_mt_subvol_healer_t);
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index f139482..0dd94dc 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -602,6 +602,10 @@ init (xlator_t *this)
if (ec_assign_read_policy (ec, read_policy))
goto failed;
+ this->itable = inode_table_new (EC_SHD_INODE_LRU_LIMIT, this);
+ if (!this->itable)
+ goto failed;
+
if (ec->shd.iamshd)
ec_selfheal_daemon_init (this);
gf_msg_debug (this->name, 0, "Disperse translator initialized.");
diff --git a/xlators/cluster/ec/src/ec.h b/xlators/cluster/ec/src/ec.h
index 4ee7983..480125e 100644
--- a/xlators/cluster/ec/src/ec.h
+++ b/xlators/cluster/ec/src/ec.h
@@ -24,6 +24,7 @@
#define EC_XATTR_DIRTY EC_XATTR_PREFIX"dirty"
#define EC_VERSION_SIZE 2
+#define EC_SHD_INODE_LRU_LIMIT 10
typedef enum {
EC_ROUND_ROBIN,