From c6c724ea61eb12710954d8e2043ca56b54f3e334 Mon Sep 17 00:00:00 2001
From: Andre Noll <maan@systemlinux.org>
Date: Mon, 12 May 2008 17:42:35 +0200
Subject: [PATCH] Add new option --keep-redundant.

---
 dss.c   |  2 ++
 dss.ggo | 14 ++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/dss.c b/dss.c
index cd69c27..49be348 100644
--- a/dss.c
+++ b/dss.c
@@ -329,6 +329,8 @@ static int try_to_free_disk_space(int low_disk_space)
 	int ret;
 	struct snapshot_list sl;
 
+	if (!low_disk_space && conf.keep_redundant_given)
+		return 0;
 	dss_get_snapshot_list(&sl);
 	ret = remove_outdated_snapshot(&sl);
 	if (ret) /* error, or we are removing something */
diff --git a/dss.ggo b/dss.ggo
index 7892d53..8037373 100644
--- a/dss.ggo
+++ b/dss.ggo
@@ -323,3 +323,17 @@ details="
 
 	A value of zero (the default) deactivates this check.
 "
+
+option "keep-redundant" k
+#~~~~~~~~~~~~~~~~~~~~~~~~
+"Prune by disk space only"
+flag off
+details="
+	If this flag is not given dss removes redundant and outdated
+	snapshots automatically.
+
+	Otherwise, this feature is deactivated so that snapshots
+	are only being removed in case disk space or inode ratio
+	becomes low. Use this flag if the file system containing the
+	destination directory is used for snapshots only.
+"
-- 
2.39.5