Don't busy-loop if pre-create hook returns non-zero.
authorAndre Noll <maan@systemlinux.org>
Mon, 8 Jun 2009 05:57:30 +0000 (07:57 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 8 Jun 2009 05:57:30 +0000 (07:57 +0200)
Sleep at least one minute before retrying.

dss.c

diff --git a/dss.c b/dss.c
index b9afbc4..d2afc10 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -718,6 +718,8 @@ static int handle_pre_create_hook_exit(int status)
                        DSS_NOTICE_LOG("deferring snapshot creation...\n");
                        warn_count = 60; /* warn only once per hour */
                }
+               gettimeofday(&next_snapshot_time, NULL);
+               next_snapshot_time.tv_sec += 60;
                snapshot_creation_status = HS_READY;
                ret = 0;
                goto out;