diff options
author | Ashish Pandey <aspandey@redhat.com> | 2016-08-30 14:17:58 +0530 |
---|---|---|
committer | Xavier Hernandez <xhernandez@datalab.es> | 2016-09-08 05:21:52 -0700 |
commit | 23e3204489151009f87100fd4eb98a33210a4565 (patch) | |
tree | d36831ca729b781c8e95433c6fee554ee9a74402 /xlators | |
parent | 105f434a5e686ae1199d6a441809cc6598cc46d8 (diff) |
cluster/ec: Add events for EC translator
This patch will generates events in following
cases which will be consumed by new event
framework.
Consider an EC volume with (K+M) configuration
K = Data bricks
M = Redundancy bricks
1- EVENT_EC_MIN_BRICKS_NOT_UP -
When minimum "K" number of bricks, required
for any ec fop, are not up.
2- EVENT_EC_MIN_BRICKS_UP
When minimum "K" number of bricks, required
for any ec fop, are up.
>Change-Id: I0414b8968c39740a171e5aa14b087afd524d574f
>BUG: 1371470
>Signed-off-by: Ashish Pandey <aspandey@redhat.com>
>Reviewed-on: http://review.gluster.org/15348
>Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Change-Id: I0414b8968c39740a171e5aa14b087afd524d574f
BUG: 1374167
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Reviewed-on: http://review.gluster.org/15425
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/ec/src/ec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c index fd8ef24ab11..659e3fd8108 100644 --- a/xlators/cluster/ec/src/ec.c +++ b/xlators/cluster/ec/src/ec.c @@ -20,6 +20,7 @@ #include "ec.h" #include "ec-messages.h" #include "ec-heald.h" +#include "events.h" static char *ec_read_policies[EC_READ_POLICY_MAX + 1] = { [EC_ROUND_ROBIN] = "round-robin", @@ -317,6 +318,7 @@ ec_up (xlator_t *this, ec_t *ec) ec->up = 1; gf_msg (this->name, GF_LOG_INFO, 0, EC_MSG_EC_UP, "Going UP"); + gf_event (EVENT_EC_MIN_BRICKS_UP, "subvol=%s", this->name); } void @@ -330,6 +332,7 @@ ec_down (xlator_t *this, ec_t *ec) ec->up = 0; gf_msg (this->name, GF_LOG_INFO, 0, EC_MSG_EC_DOWN, "Going DOWN"); + gf_event (EVENT_EC_MIN_BRICKS_NOT_UP, "subvol=%s", this->name); } void @@ -437,7 +440,7 @@ void ec_pending_fops_completed(ec_t *ec) { if (ec->shutdown) { - default_notify(ec->xl, GF_EVENT_PARENT_DOWN, NULL); + default_notify (ec->xl, GF_EVENT_PARENT_DOWN, NULL); } } |