summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-static-delta-private.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-09-01 12:05:36 +0200
committerAlexander Larsson <alexl@redhat.com>2020-10-23 12:30:08 +0200
commiteffde3d513de1570488ddf13dac43c6413a44c68 (patch)
tree875716fe54ee78035e8505eeaa2259d803417caa /src/libostree/ostree-repo-static-delta-private.h
parent8e1f199dd4d035b5ff501aa37c6f1229ac3c0e61 (diff)
downloadostree-effde3d513de1570488ddf13dac43c6413a44c68.tar.gz
deltas: Update delta indexes when updating summary
When we update the summary file (and its list of deltas) we also update all delta indexes. The index format is a single `a{sv}` variant identical to the metadata-part of the summary with (currently) only the `ostree.static-deltas` key. Since we expect most delta indexes to change rarely, we avoid unnecessary writes when reindexing. New indexes are compared to existing ones and only the changed ones are written to disk. This avoids unnecessary write load and mtime changes on the repo server.
Diffstat (limited to 'src/libostree/ostree-repo-static-delta-private.h')
-rw-r--r--src/libostree/ostree-repo-static-delta-private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo-static-delta-private.h b/src/libostree/ostree-repo-static-delta-private.h
index 5a2e6879..d6c706da 100644
--- a/src/libostree/ostree-repo-static-delta-private.h
+++ b/src/libostree/ostree-repo-static-delta-private.h
@@ -227,6 +227,11 @@ _ostree_repo_static_delta_delete (OstreeRepo *repo,
const char *delta_id,
GCancellable *cancellable,
GError **error);
+gboolean
+_ostree_repo_static_delta_reindex (OstreeRepo *repo,
+ const char *opt_to_commit,
+ GCancellable *cancellable,
+ GError **error);
/* Used for static deltas which due to a historical mistake are
* inconsistent endian.