Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new version 1 format that uses the new xwhiteout marking approach #237

Merged
merged 4 commits into from
Jan 26, 2024

Commits on Jan 19, 2024

  1. Add --format-version to mkcomposefs and composefs-dump

    This allows specifying the version to use in order to get
    reproducible builds. The default is to use the max supported
    version.
    
    Signed-off-by: Alexander Larsson <[email protected]>
    alexlarsson committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    8f159aa View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Add new version 1 that uses the new xwhiteout marking approach

    Linux upstream is making some change to how xwhiteout directories
    are marked. They are now marked with an opaque xattr with content "x".
    
    See:
     https://lore.kernel.org/linux-unionfs/CAOQ4uxh5x_-1j8HViCutVkghA1Uh-va+kJshCuvB+ep7WjmOFg@mail.gmail.com/T/#t
    
    This creates a new image format version, 1, which adds these xattrs
    (and the old ones for backwards compat with linux 6.7).
    
    In addition, the tests are updated to handle this, and we create a new testcase that validates both v0 and v1 keeps working for whiteout files.
    
    Note: This changes the output of the CLI tools to use the new version
    by default, and you need to pass --verison-format=0 to get the old
    version. This is ok at this point, as most images are unaffected by
    the version due to lack of whiteouts, and not many people use
    composefs yet.
    
    Signed-off-by: Alexander Larsson <[email protected]>
    alexlarsson committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    64cc42e View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. Write: record used composefs version in erofs image and allow reading…

    … it back
    
    Signed-off-by: Alexander Larsson <[email protected]>
    alexlarsson committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    1c00763 View commit details
    Browse the repository at this point in the history
  2. Add support for max_version

    Instead of specifying just the version we now specify the min and max
    version, and composefs tries to keep the version as low as possible
    but may bump it if needed for newer features. This is necessary as we
    now record the version in the image, and we want to avoid
    unnecessarily storing a later version in the image, as would change
    the digest of images where this is not needed.
    
    We also introduce new macros for the default max version to use in the
    tooling, instead of just using the max version. This allows more
    careful bumping of the default later.
    
    Signed-off-by: Alexander Larsson <[email protected]>
    alexlarsson committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    8d5b52d View commit details
    Browse the repository at this point in the history