From 56cb4048819e7c6ed00cd5723b823f3bb92c1d61 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 5 Mar 2009 10:38:39 +0100 Subject: [PATCH] Introduce the snapshot removal status. It is not yet used, but we need something like that for the remove-hooks. --- dss.c | 2 ++ snap.h | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/dss.c b/dss.c index fd876e5..2660348 100644 --- 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 afac5e9..7ac951f 100644 --- 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. * -- 2.39.5