summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/primary.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-08-27 20:48:12 +0000
committerpjd <pjd@FreeBSD.org>2010-08-27 20:48:12 +0000
commitbd949b7dfc6795cba33cdec12513fda317bc6a16 (patch)
tree465c065e41c1d5b7964ce8f6c1f3b79f81631298 /sbin/hastd/primary.c
parent58060e750b215eb1cc02635a6eedb72cb127db64 (diff)
downloadFreeBSD-src-bd949b7dfc6795cba33cdec12513fda317bc6a16.zip
FreeBSD-src-bd949b7dfc6795cba33cdec12513fda317bc6a16.tar.gz
Add hooks execution.
MFC after: 2 weeks Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
Diffstat (limited to 'sbin/hastd/primary.c')
-rw-r--r--sbin/hastd/primary.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index bc91266..0b02065 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -1517,6 +1517,8 @@ sync_thread(void *arg __unused)
pjdlog_info("Synchronization interrupted. "
"%jd bytes synchronized so far.",
(intmax_t)synced);
+ hook_exec(res->hr_exec, "syncintr",
+ res->hr_name, NULL);
}
while (!sync_inprogress) {
dorewind = true;
@@ -1549,6 +1551,8 @@ sync_thread(void *arg __unused)
pjdlog_info("Synchronization started. %ju bytes to go.",
(uintmax_t)(res->hr_extentsize *
activemap_ndirty(res->hr_amp)));
+ hook_exec(res->hr_exec, "syncstart",
+ res->hr_name, NULL);
}
}
if (offset < 0) {
@@ -1565,6 +1569,8 @@ sync_thread(void *arg __unused)
pjdlog_info("Synchronization complete. "
"%jd bytes synchronized.",
(intmax_t)synced);
+ hook_exec(res->hr_exec, "syncdone",
+ res->hr_name, NULL);
}
mtx_lock(&metadata_lock);
res->hr_syncsrc = HAST_SYNCSRC_UNDEF;
OpenPOWER on IntegriCloud