-
Notifications
You must be signed in to change notification settings - Fork 246
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
overlay, composefs: use data-only lower layers #1713
Conversation
19118f6
to
5ff2951
Compare
How is whether or not we can use a data-only lower layer determined? Is there a run-time feature test for this? |
5ff2951
to
514dbc0
Compare
I've added a run-time feature test. Without the data-only lower layers feature we are limited to mount only images with a single layer when using composefs. I don't think it is worth the extra complexity, so composefs is disabled when the feature is not present. @alexlarsson PTAL |
we also need: #1712 |
#1712 is merged |
514dbc0
to
b83bd45
Compare
drivers/overlay/overlay.go
Outdated
} | ||
// absLowers is not valid anymore now as we have added composeFsLayers to it, so prevent | ||
// its usage. | ||
absLowers = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linter says: ineffectual assignment about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
b83bd45
to
210c31a
Compare
ready for review |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really like a test that ensures that the driver does the right thing when the feature is available and asked for, even if it has to be skipped in CI in the short-term.
25e0478
to
fbe981b
Compare
Sure, I can add some tests. Do you think there is anything in particular we should test for? Once composefs is enabled, there should not be any visible difference for the users and the existing tests should still work |
Do we have tests that exercise using composefs layers as read-only layers? |
I don't think it would be any different than the tests we already have, the only difference with composefs is that there will be more 2x lower layers (for each layer there is one overlay layer with the erofs file system and one for the data) |
fbe981b
to
64284da
Compare
8803c74
to
027416c
Compare
ebcf14d
to
0287143
Compare
thanks, comments addressed in the current version |
can I get another review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, but looks good to me.
0287143
to
c34d862
Compare
@alexlarsson @nalind PTANL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[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 |
if d.options.mountOptions is the empty string, we should not append an empty option. Signed-off-by: Giuseppe Scrivano <[email protected]>
use the new overlay data-only feature to mount the composefs data directory so there is no need for upper layers to create whiteouts to hide payload files. The feature was added to Linux 6.5. Signed-off-by: Giuseppe Scrivano <[email protected]>
Signed-off-by: Giuseppe Scrivano <[email protected]>
c34d862
to
77fa03d
Compare
rebased, can you please take another look? |
@nalind could you please take another look? |
dataOnly := false | ||
for _, lowerPath := range lowers { | ||
if lowerPath == "" { | ||
dataOnly = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this loop be enforcing the "once we see a data-only layer, they should all be data-only layers" requirement that the kernel has?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure, if the input is not correct we'd get a similar error from Mount
as we do if we call directly the syscall and we are not doing any validation in the mountOverlayFromMain
function.
I don't think we need it, but if you prefer to have it, I'll add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a blocker for me so long as it's something we thought about, and not a "we didn't think of that" that becomes a problem later on.
add a new command to exercise the ApplyDiff from a staging directory. Signed-off-by: Giuseppe Scrivano <[email protected]>
Signed-off-by: Giuseppe Scrivano <[email protected]>
77fa03d
to
42fa4a9
Compare
LGTM |
/lgtm (reflecting others’ reviews, really) |
use the new overlay data-only feature to mount the composefs data directory so there is no need for upper layers to create whiteouts to hide payload files.
The feature was added to Linux 6.5.
Signed-off-by: Giuseppe Scrivano [email protected]