Skip to content

Conversation

@hsiangkao
Copy link
Member

@hsiangkao hsiangkao commented Jul 1, 2025

Derive filesystem UUIDs (lsblk -o +UUID) from the OCI layer digests (although diffIDs are better in principle, but they're unavailable by differs in advance) rather than generating a random one.

This allows EROFS to uniquely identify each layer using the content-addressable filesystem UUID.

Note: currently uuid.NewSHA1(uuid.NameSpaceURL, []byte("erofs:blobs/"+desc.Digest)) is used to generate filesystem UUIDs.

Derive filesystem UUIDs (`lsblk -o +UUID`) from the OCI layer digests
(although diffIDs are better in principle, but they're unavailable by
differs in advance) rather than generating a random one.  This allows
EROFS to uniquely identify each layer using the content-addressable
filesystem UUID.

It can also be used for reproducible builds. To achieve this, configure
`mkfs_options` with `-T0 --mkfs-time` (However, `--mkfs-time` requires
erofs-utils 1.8+; Otherwise, all inode timestamps will be reset w/o it):

``` toml
  [plugins."io.containerd.differ.v1.erofs"]
    mkfs_options = ["-T0 --mkfs-time"]
```

Fixes: c73c8e5 ("Introduce EROFS differ")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
@hsiangkao hsiangkao force-pushed the erofs-snapshotter branch from db2cab1 to a0ed14f Compare July 2, 2025 00:26
@hsiangkao
Copy link
Member Author

hsiangkao commented Jul 2, 2025

/cc @dmcgowan @fuweid @djdongjin @cpuguy83
(another small PR...)

@github-project-automation github-project-automation bot moved this from Needs Triage to Review In Progress in Pull Request Review Jul 2, 2025
@AkihiroSuda AkihiroSuda added this pull request to the merge queue Jul 2, 2025
Merged via the queue into containerd:main with commit 6fa6aa9 Jul 2, 2025
88 of 90 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Jul 2, 2025
@hsiangkao
Copy link
Member Author

/cherry-pick release/2.1

@k8s-infra-cherrypick-robot

@hsiangkao: new pull request created: #12058

Details

In response to this:

/cherry-pick release/2.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants