From 1e4f9c58a1b013f3f27d515d72d1e76e1a53436e Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Wed, 8 Feb 2017 10:48:55 -0500 Subject: 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 Reviewed-on: https://review.gluster.org/16567 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Anoop C S Reviewed-by: jiffin tony Thottan Reviewed-by: Shyamsundar Ranganathan --- xlators/features/trash/src/trash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features') 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; -- cgit