diff options
author | Umang Jain <umang@endlessm.com> | 2018-09-14 01:07:32 +0530 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-09-21 15:09:12 +0000 |
commit | a0937b6cf03996416c338b996a87677d6b65da14 (patch) | |
tree | 6d0e72ff0f0cc24d5e7b3a96e43d6c3ecdb76586 /src/libostree/ostree-repo.h | |
parent | fc84fb402c397213108710e17ddf88108f0ae2cb (diff) | |
download | ostree-a0937b6cf03996416c338b996a87677d6b65da14.tar.gz |
lib/repo: Separate min-free-space-* calculation from transaction codepath
Earlier, the actual reserved space (in blocks) were calculated inside the
transaction codepath ostree_repo_prepare_transaction(). However, while
reworking on ostree_repo_get_min_free_space_bytes() API, it was realized that
this calculation can be done independently from the transaction's codepaths, hence
enabling the usage for ostree_repo_get_min_free_space_bytes() API irrespective
of whether there is an ongoing transaction or not.
https://github.com/ostreedev/ostree/issues/1720
Closes: #1722
Approved by: pwithnall
Diffstat (limited to 'src/libostree/ostree-repo.h')
-rw-r--r-- | src/libostree/ostree-repo.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h index 6159fc24..a6544761 100644 --- a/src/libostree/ostree-repo.h +++ b/src/libostree/ostree-repo.h @@ -128,7 +128,9 @@ _OSTREE_PUBLIC OstreeRepoMode ostree_repo_get_mode (OstreeRepo *self); _OSTREE_PUBLIC -guint64 ostree_repo_get_min_free_space_bytes (OstreeRepo *self); +gboolean ostree_repo_get_min_free_space_bytes (OstreeRepo *self, + guint64 *out_reserved_bytes, + GError **error); _OSTREE_PUBLIC GKeyFile * ostree_repo_get_config (OstreeRepo *self); |