X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=dss.c;h=089f954da86ceeb9997420300e466c0a45a619b8;hb=0f690a04483ee9833f371a4a807b6897e9e3d9d8;hp=b9afbc4a8505d1886420d1355bd742dbdd73c756;hpb=442d1920cb866fb6e0a816d7e175b5cdb8c0e1a8;p=dss.git diff --git a/dss.c b/dss.c index b9afbc4..089f954 100644 --- a/dss.c +++ b/dss.c @@ -432,6 +432,9 @@ static int try_to_free_disk_space(int low_disk_space) if (!low_disk_space && conf.keep_redundant_given) return 0; dss_get_snapshot_list(&sl); + ret = 0; + if (!low_disk_space && sl.num_snapshots <= 1) + goto out; why = "outdated"; victim = find_outdated_snapshot(&sl); if (victim) @@ -441,7 +444,6 @@ static int try_to_free_disk_space(int low_disk_space) if (victim) goto remove; /* try harder only if disk space is low */ - ret = 0; if (!low_disk_space) goto out; why = "orphaned"; @@ -718,6 +720,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;