lib/repo: Add min-free-space-size option

Similar to min-free-space-percent but it supports specific sizes
(in MB, GB or TB). Also, making min-free-space-percent and -size
mutually exclusive.

min-free-space-percent does not give a fine tuning of the free disk
space that a user might decide to keep. It can translate to very large
size (e.g. 1% = ~10GB on 1TB HDD) or very small (e.g. 1% = ~330MB on 32GB
system like Endless devices). Hence, it makes sense to introduce a config
option to honor specific size as per the user.

Closes: #1616
Approved by: jlebon
This commit is contained in:
Umang Jain authored and Atomic Bot committed 2018-06-13 18:57:37 +00:00
1 parent c767f7b739
commit 31809d32f2
5 files changed
+132 -19

No files matched your search

+1
View File
@@ -151,6 +151,7 @@ struct OstreeRepo {
uid_t target_owner_uid; /* Ensure files are chowned to this uid/gid */
gid_t target_owner_gid;
guint min_free_space_percent; /* See the min-free-space-percent config option */
guint64 min_free_space_size; /* See the min-free-space-size config option */
guint test_error_flags; /* OstreeRepoTestErrorFlags */