]> git.tue.mpg.de Git - dss.git/commitdiff
Remove orphaned snapshots even if disk space is not low.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 29 Dec 2015 15:33:11 +0000 (15:33 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 3 Mar 2016 14:34:48 +0000 (15:34 +0100)
Due to the previous patch, this is only executed if we have too many
snapshot anyway.

dss.c

diff --git a/dss.c b/dss.c
index a3bda5330510e5290ef234d0a8e67b29a726461d..08a9f4c5767918c9226b51d721d11dc83de0e07f 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -627,13 +627,13 @@ static int try_to_free_disk_space(void)
        victim = find_redundant_snapshot(&sl);
        if (victim)
                goto remove;
-       /* try harder only if disk space is low */
-       if (!low_disk_space)
-               goto out;
        why = "orphaned";
        victim = find_orphaned_snapshot(&sl);
        if (victim)
                goto remove;
+       /* try harder only if disk space is low */
+       if (!low_disk_space)
+               goto out;
        DSS_WARNING_LOG(("disk space low and nothing obvious to remove\n"));
        victim = find_oldest_removable_snapshot(&sl);
        if (victim)