Skip to content

Conversation

@dmcgowan
Copy link
Member

@dmcgowan dmcgowan commented Aug 28, 2025

Switch to use fs.FS interface over directly requiring path string. This interface allows the filesystem operations to be further abstracted, then we can use any library which can return an FS from mounts without requiring an active mount. This is useful for supporting erofs on hosts which cannot directly mount it.

Using os.OpenRoot over continuity's RootPath is the preferred solution going forward as it is part of the standard library and able to leverage the openat syscall. Switching with this package first is the safest since it does not resolve user provided paths against the root.

@github-project-automation github-project-automation bot moved this to Needs Triage in Pull Request Review Aug 28, 2025
@dosubot dosubot bot added the go Pull requests that update Go code label Aug 28, 2025
@hsiangkao
Copy link
Member

hsiangkao commented Aug 28, 2025

Thanks derek, I'm still working on some erofs-utils improvements (now stablizing C apis, and S3, OCI registry, virtual block device support in erofs-utils especially for quick new kernel feature showcase), hopefully I could switch to go-erofs development soon too.

@dmcgowan dmcgowan force-pushed the oci-use-fs-interface branch from aebebe7 to 934aa05 Compare August 28, 2025 17:33
Switch to use fs.FS interface over directly requiring path string.
Use os.OpenRoot over continuity RootPath.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@mxpv mxpv force-pushed the oci-use-fs-interface branch from 934aa05 to cc2a52c Compare August 29, 2025 19:59
@github-project-automation github-project-automation bot moved this from Needs Triage to Review In Progress in Pull Request Review Aug 30, 2025
@mxpv mxpv added this pull request to the merge queue Aug 30, 2025
Merged via the queue into containerd:main with commit 2a0b0cd Aug 30, 2025
92 of 96 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Aug 30, 2025
@dmcgowan dmcgowan changed the title Update pkg/oci to use fs.FS interface Update pkg/oci to use fs.FS interface and os.OpenRoot Sep 2, 2025
@dmcgowan dmcgowan added the area/client Go client label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/client Go client go Pull requests that update Go code impact/changelog size/L

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants