From d6a23889b174cce1f54560a036d82c84b2bf53c5 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Tue, 10 May 2016 01:50:08 -0400 Subject: leases: Fix the notify being lost The notify() implemented doesn't really add any value and the EXIT_IF_LEASES_OFF in notify() can cause the notifications to be lost if leases if off. Hence remove the notify definition from leases, also fix a log level. Backport of http://review.gluster.org/#/c/14275/ Change-Id: I8bf30d26f08034a16a450ed811dcf8ac57d70a94 BUG: 1337638 Signed-off-by: Poornima G Reviewed-on: http://review.gluster.org/14275 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Raghavendra Talur CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G (cherry picked from commit 58c577994b2bf67b6f8d9749d9c7d678edfc9ceb) Reviewed-on: http://review.gluster.org/14429 --- xlators/features/leases/src/leases.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/xlators/features/leases/src/leases.c b/xlators/features/leases/src/leases.c index 8783a5ce9c2..2c1db34bd9c 100644 --- a/xlators/features/leases/src/leases.c +++ b/xlators/features/leases/src/leases.c @@ -991,11 +991,11 @@ init (xlator_t *this) priv->timer_wheel = glusterfs_global_timer_wheel (this); if (!priv->timer_wheel) { - gf_msg (this->name, GF_LOG_ERROR, 0, LEASE_MSG_NO_TIMER_WHEEL, - "Initing the global timer wheel"); + gf_msg_debug (this->name, 0, "Initing the global timer wheel"); ret = glusterfs_global_timer_wheel_init (this->ctx); if (ret) { - gf_msg (this->name, GF_LOG_INFO, 0, LEASE_MSG_NO_TIMER_WHEEL, + gf_msg (this->name, GF_LOG_ERROR, 0, + LEASE_MSG_NO_TIMER_WHEEL, "Initing the global timer wheel failed"); goto out; } @@ -1059,18 +1059,6 @@ out: return ret; } -int -notify (xlator_t *this, int32_t event, void *data, ...) -{ - int ret = 0; - - EXIT_IF_LEASES_OFF (this, out); - - ret = default_notify (this, event, data); -out: - return ret; -} - struct xlator_fops fops = { /* Metadata modifying fops */ .fsetattr = leases_fsetattr, -- cgit