Skip to content

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Aug 6, 2024

the main advantage in this case is that it splits the mount operation in multiple steps, so it is easier (hopefully) to find out what goes wrong.

@giuseppe giuseppe changed the title Compoe fs use new mount api composefs use new mount api Aug 6, 2024
@openshift-ci openshift-ci bot added the approved label Aug 6, 2024
@@ -154,8 +154,38 @@ func mountComposefsBlob(dataDir, mountPoint string) error {
mountOpts += "noacl"
}

if err := unix.Mount(loop.Name(), mountPoint, "erofs", unix.MS_RDONLY, mountOpts); err != nil {
return fmt.Errorf("failed to mount erofs image at %q: %w", mountPoint, err)
fsfd, err := unix.Fsopen("erofs", 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How old is the new mount api? Don't we want to fall back to mount on ENOSYS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't care about the fallback as old kernels do not support anyway the features we need in overlay (and possibly erofs itself)

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the compose-fs-use-new-mount-api branch from 128277d to 1a6957b Compare August 6, 2024 13:46
Copy link
Contributor

openshift-ci bot commented Aug 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexlarsson, giuseppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Aug 6, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 6, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 6b538ae into containers:main Aug 6, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants