summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2017-02-08 10:48:55 -0500
committerShyamsundar Ranganathan <srangana@redhat.com>2017-02-09 08:46:45 -0500
commit1e4f9c58a1b013f3f27d515d72d1e76e1a53436e (patch)
treee8f444029fd13b3d599ea5ce2cba32407667d369 /xlators/features
parent9ac193a19b0ca6d6548aeafa5c915b26396f8697 (diff)
trash: fix problem with trash feature under multiplexing
With multiplexing, the trash translator gets a reconfigure call before a notify(CHILD_UP). In this case, priv->trash_itable was not yet initialized, so the reconfigure would get a SEGV. Moving the itable allocation to init seems to fix it, so trash can be reenabled. Change-Id: I21ac2d7fc66bac1bc4ec70fbc8bae306d73ac565 BUG: 1420434 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: https://review.gluster.org/16567 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/trash/src/trash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index 3f1b4c5dd1a..e321a05a01b 100644
--- a/xlators/features/trash/src/trash.c
+++ b/xlators/features/trash/src/trash.c
@@ -2375,7 +2375,6 @@ notify (xlator_t *this, int event, void *data, ...)
/* Check whether posix is up not */
if (event == GF_EVENT_CHILD_UP) {
- priv->trash_itable = inode_table_new (0, this);
if (!priv->state) {
gf_log (this->name, GF_LOG_DEBUG, "trash xlator is off");
goto out;
@@ -2547,6 +2546,7 @@ init (xlator_t *this)
goto out;
}
+ priv->trash_itable = inode_table_new (0, this);
gf_log (this->name, GF_LOG_DEBUG, "brick path is%s", priv->brick_path);
this->private = (void *)priv;