summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f97a8c)
raw | patch | inline | side by side (parent: 7f97a8c)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 28 Sep 2009 13:56:26 +0000 (15:56 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 28 Sep 2009 13:56:26 +0000 (15:56 +0200) |
This message is printed if the user did supply a <WAFL /> block but
then disabled all supported values. WAFL collection will be disabled
in this case to increase performance.
then disabled all supported values. WAFL collection will be disabled
in this case to increase performance.
src/netapp.c | patch | blob | history |
diff --git a/src/netapp.c b/src/netapp.c
index a4b30cc072efedda9a8e5516b32cda14426b6906..c2ebc9f96efbe202147edfcdcdb5f32299279ca8 100644 (file)
--- a/src/netapp.c
+++ b/src/netapp.c
free_disk (next);
} /* }}} void free_disk */
+static void free_cfg_wafl (cfg_wafl_t *cw) /* {{{ */
+{
+ if (cw == NULL)
+ return;
+
+ if (cw->query != NULL)
+ na_elem_free (cw->query);
+
+ sfree (cw);
+} /* }}} void free_cfg_wafl */
+
static void free_cfg_disk (cfg_disk_t *cfg_disk) /* {{{ */
{
if (cfg_disk == NULL)
free_cfg_service (hc->services);
free_cfg_disk (hc->cfg_disk);
+ free_cfg_wafl (hc->cfg_wafl);
free_volume (hc->volumes);
sfree (hc);
@@ -1695,6 +1707,14 @@ static int cna_config_wafl(host_config_t *host, oconfig_item_t *ci) /* {{{ */
"`WAFL' blocks.", item->key);
}
+ if ((cfg_wafl->flags & CFG_WAFL_ALL) == 0)
+ {
+ NOTICE ("netapp plugin: All WAFL related values have been disabled. "
+ "Collection of WAFL data will be disabled entirely.");
+ free_cfg_wafl (host->cfg_wafl);
+ host->cfg_wafl = NULL;
+ }
+
return (0);
} /* }}} int cna_config_wafl */