Commit Graph

29 Commits

Author SHA1 Message Date
Matthew Barnes cca69b3f55 Use g_autoptr(GVariantBuilder) instead of gs_unref_variant_builder 2015-05-06 22:07:11 -04:00
Matthew Barnes c2c322efa9 Use g_autoptr(GVariant) instead of gs_unref_variant 2015-05-06 22:07:10 -04:00
Matthew Barnes bb231fdf74 Use g_autoptr(GPtrArray) instead of gs_unref_ptrarray 2015-05-06 22:07:10 -04:00
Matthew Barnes 196d983af9 Use g_autoptr(GHashTable) instead of gs_unref_hashtable 2015-05-06 22:07:10 -04:00
Matthew Barnes e6556dd223 Use g_autoptr(GBytes) instead of gs_unref_bytes 2015-05-06 22:07:10 -04:00
Matthew Barnes 3f044267b5 Use g_autoptr(GChecksum) instead of gs_free_checksum 2015-05-06 22:07:10 -04:00
Matthew Barnes 4ee1acd981 Use g_autoptr() for GIO object types
GLib 2.44 supplies all the necessary autocleanup macros for GIO types,
and libglnx backports the relevant macros for ostree.
2015-05-06 21:51:19 -04:00
Matthew Barnes 7a62d64968 Use g_autofree instead of gs_free 2015-05-06 21:50:17 -04:00
Giuseppe Scrivano cf30f8717a g_output_stream_splice: check correctly the error code
While at it, change the style of other two occurrences.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-24 18:26:22 +02:00
Giuseppe Scrivano 150048f9b8 src: drop some dead assignments
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-06 18:45:37 +01:00
Colin Walters 3e3eb01335 deltas: Gather statistics on total number rollsum'd and bsdiff'd
Useful for debugging at least.  Though in the future it'd be nice to
store this inside the delta metadata maybe?
2015-03-03 18:32:24 -05:00
Giuseppe Scrivano 948327fb67 ostree_repo_static_delta_generate: add new param "verbose"
it will be used by the next patch that adds "--generate-static-delta"
to the commit command.

As part of the patch, update the list of supported "params" in the
documentation.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-03 12:16:17 -05:00
Colin Walters 392929d9bc static-delta: Add --disable-bsdiff option
A builder may not want to pay the CPU penalty.  Also it's useful for
evaluating performance.
2015-03-03 12:16:17 -05:00
Giuseppe Scrivano 439e1c1b97 static-delta: increase threshold for rollsum to 50%
It favours bsdiff usage for files that are not very rollsum friendly.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-03 12:16:17 -05:00
Giuseppe Scrivano 3f3bb8e37d Add bsdiff support to deltas
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-03 12:16:17 -05:00
Colin Walters c54df89771 deltas: Search for similar objects (possibly renamed across directories)
The previous diff algorithm was file tree based, and only looked
at modified files that lived at the same path.

However, components like the Linux kernel have versioned
subdirectories, e.g. /usr/lib/modules/$kver/.../ext4.ko.  We want to
be able to detect these "modified renames" so that we can compute
diffs (rollsum, bsdiff).
2015-02-16 10:10:35 -05:00
Colin Walters 08476ce254 deltas: Prune deltas when the corresponding "to" commit vanishes
We want prune to actually give you back disk space when using deltas.
2015-02-16 10:10:35 -05:00
Colin Walters 9aa7e30b38 deltas: Implement rollsums
This does an rsync-style prepared delta basically.  On my test data,
it shaves ~6MB of uncompressed data.  Not a huge amount, but I expect
this to be more useful for things like binaries which embed data, etc.
2015-02-16 10:10:35 -05:00
Colin Walters 8fb29c9e5d deltas: Print total size of rollsums we would use 2015-02-16 10:10:35 -05:00
Colin Walters 3df8be0d92 deltas: Compute rollsum targets 2015-02-16 10:10:35 -05:00
Colin Walters d749932f6b deltas: Rework format to allow streaming
There's still some silliness here, but there is now only one opcode
open-splice-and-close, that writes a single chunk from the payload.
This is really all we need for metadata, and small content objects are
also fine with this.

We get some deduplication between content objects by creating a
dictionary for (uid,gid,mode) tuples and xattrs.

This still keeps the operation/payload code in, so we could do
rollsums in a future update easily.
2015-02-16 10:10:35 -05:00
Colin Walters 92cc3b5968 deltas: Use base64 for csums, add version to parts 2015-02-16 10:10:35 -05:00
Alexander Larsson 638431045c static delta generation: Separate max chunk size from min fallback size
There is no particular reason these have to be the same.

https://bugzilla.gnome.org/show_bug.cgi?id=721799
2015-01-20 14:45:45 +01:00
Alexander Larsson 5b721a5b08 Allow creating and pulling static deltas starting from "empty"
You create these with something like:
  ostree static-delta generate --empty --to=master

These will be automatically used during pull if no previous revision
exists in the target repo.

These work very much like the normal static deltas except they
are named just by the "to" revision. I.e:

deltas/94/f7d2dc23759dd21f9bd01e6705a8fdf98f90cad3e0109ba3f6c091c1a3774d

for a from-scratch to 94f7d2dc23759dd21f9bd01e6705a8fdf98f90cad3e0109ba3f6c091c1a3774d delta.

https://bugzilla.gnome.org/show_bug.cgi?id=721799
2015-01-14 14:43:32 +01:00
Colin Walters 97fbd872ae deltas: Do not traverse all objects, only both commits
That's the way they were designed.  We really don't want to include
all intervening objects.

https://bugzilla.gnome.org/show_bug.cgi?id=721799
2015-01-13 21:32:39 -05:00
Colin Walters e3f9f331a2 Two 32 bit compilation fixes 2015-01-12 12:43:03 -05:00
Colin Walters ca678224be Static deltas support
https://bugzilla.gnome.org/show_bug.cgi?id=721799
2014-12-18 12:48:47 +01:00
Colin Walters 60c4d467aa deltas: Add a timestamp to delta metadata 2014-02-10 09:40:35 -05:00
Colin Walters 2d6374822b Initial basic static delta code drop
This has a very basic level of functionality (deltas can be generated,
and applied offline).  There is only some stubbed out pull code to
fetch them via HTTP.

But, better to commit this now and improve it from a known starting
point, rather than have it languish in a branch.
2014-02-04 10:31:44 -05:00