composefs: Bump composefs max version to 1
authorAlexander Larsson <alexl@redhat.com>
Wed, 31 Jan 2024 11:01:36 +0000 (12:01 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 31 Jan 2024 11:09:35 +0000 (12:09 +0100)
This generates the new format for whiteout markers which was added in
6.8 (and which will be backported to 6.7). Without this whiteouts
will not work anymore.

This is a slight format change, but will only affect ostree commits
that already were broken (i.e that had whiteouts), and since the
composefs code is still marked experimental I think it is fine to
do this without introducing another format version on the ostree
side.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
src/libostree/ostree-repo-composefs.c

index cc5e5fde1f70253dd2aaa37d5fc8181814af97c3..5be83e0d72c1b660cd38e5d674e57c1c59ed9cde 100644 (file)
@@ -235,6 +235,9 @@ ostree_composefs_target_write (OstreeComposefsTarget *target, int fd, guchar **o
       options.file_write_cb = _composefs_write_cb;
     }
 
+  options.version = 0;
+  options.max_version = 1; /* Support new whiteout xattr if required */
+
   if (lcfs_write_to (root, &options) != 0)
     return glnx_throw_errno_prefix (error, "lcfs_write_to");