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

Consolidate the PuzzleFS rootfs metadata into a single metadata file #127

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

ariel-miculas
Copy link
Collaborator

This simplifies the PuzzleFS layout by storing all the metadata
information into a single metadata file. The previous layout had one
manifest file which contained references to a list of metadata files,
each stored separately.

This simplifies the PuzzleFS layout by storing all the metadata
information into a single metadata file. The previous layout had one
manifest file which contained references to a list of metadata files,
each stored separately.

Relevant discussions: project-machine#55

Signed-off-by: Ariel Miculas-Trif <[email protected]>
@rchincha
Copy link

rchincha commented Sep 6, 2024

Do you have a case where metadata files are added/removed/modified? If so, how would this affect this.

@ariel-miculas
Copy link
Collaborator Author

I would argue that it's not a common operation to manipulate the layers of an existing image. If there's a new version available for an image, then it would also have a different tag.
Assuming we would like to add/remove metadata files corresponding to an existing image (changing a metadata file is not possible, since it's content addressed):

  1. in the old format, the manifest would need to be updated to register the addition or deletion of a metadata file; then, the metadata file itself would need to be created or deleted, depending on the operation;
  2. in the new format, the metadata file is embedded into one PuzzleFS "rootfs" file which contains the entire PuzzleFS metadata, so the change is needed only in one place.

In both cases, the data chunks shared between PuzzleFS images are stored in separate files (as separate content-defined blobs), so the space savings is not affected by this change. For the canonical format I believe we will gravitate towards a single layer (a layer was defined in the previous format by the metadata file) per PuzzleFS image (referred to previously as the PuzzleFS "rootfs" file), so it makes sense to have all the metadata information into a single file.

With this change, there will be two media types for PuzzleFS:

  • application/vnd.puzzlefs.image.rootfs.v1 - for the PuzzleFS metadata (or PuzzleFS "rootfs" file)
  • application/vnd.puzzlefs.image.filedata.v1 - for the data chunks obtained as a result of the FastCDC algorithm

This simplifies the design because we don't have to keep track of all the metadata files referenced by the PuzzleFS manifest files. Each PuzzleFS image will have a single metadata file (the PuzzleFS "rootfs" file) and the associated data chunk files.

@ariel-miculas
Copy link
Collaborator Author

@hallyn any thoughts on this?

@ariel-miculas ariel-miculas merged commit ab7a74f into project-machine:master Sep 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants