]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Introduce the snapshot removal status.
authorAndre Noll <maan@systemlinux.org>
Thu, 5 Mar 2009 09:38:39 +0000 (10:38 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 16 Mar 2009 16:23:31 +0000 (17:23 +0100)
It is not yet used, but we need something like that for the remove-hooks.

dss.c
snap.h

diff --git a/dss.c b/dss.c
index fd876e5ddc1d340dec79dee84f9706dc9a09912f..2660348254d0fca329b2ac24d43df245fb3364a7 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -54,6 +54,8 @@ static int64_t current_snapshot_creation_time;
 static char *path_to_last_complete_snapshot;
 /** \sa \ref snap.h for details. */
 static unsigned snapshot_creation_status;
+/** \sa \ref snap.h for details. */
+static unsigned snapshot_removal_status;
 
 
 DEFINE_DSS_ERRLIST;
diff --git a/snap.h b/snap.h
index afac5e9554ab6eae991e796bbf386bddb82d8540..7ac951fc313adb9f0867bc90463d4773f215adb9 100644 (file)
--- a/snap.h
+++ b/snap.h
@@ -22,6 +22,20 @@ enum {
        SCS_POST_HOOK_RUNNING,
 };
 
+/** The state of snapshot removal. */
+enum {
+       /** No snapshot is currently being removed. */
+       SRS_READY,
+       /** The pre-removal hook has been started. */
+       SRS_PRE_HOOK_RUNNING,
+       /** The pre-remove hook failed, we're waiting to execute it again. */
+       SRS_PRE_HOOK_FAILURE,
+       /** The rm command is currently executing. */
+       SRS_RM_RUNNING,
+       /** The post-remove hook ist running. */
+       SRS_POST_HOOK_RUNNING,
+};
+
 /**
  * The status of a snapshot.
  *