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

Hard link limitations in union filesystems #1211

Merged

Conversation

sudo-bmitch
Copy link
Contributor

Fixes #1204.

This calls out the limitations of hard links in a union filesystem. E.g. in some configurations a hard link may be broken when multiple files are hard linked and a change is made to one file or a hard link is created to a lower filesystem file. See https://docs.kernel.org/filesystems/overlayfs.html#index

tianon
tianon previously approved these changes Oct 25, 2024
layer.md Outdated
@@ -69,6 +69,8 @@ Where supported, MUST include file attributes for Additions and Modifications in
- Non-directory files are considered "hardlinked" when their link count is greater than 1.
- Hardlinked files are on a same device (i.e. comparing Major:Minor pair) and have the same inode.
- The corresponding files that share the link with the > 1 linkcount may be outside the directory that the changeset is being produced from, in which case the `linkname` is not recorded in the changeset.
- Union filesystem implementations may have limited or no support for hardlinks, particularly when a change is made to a hardlinked file or a hardlink is created to a file in a lower filesystem.
Copy link
Member

@sajayantony sajayantony Nov 7, 2024

Choose a reason for hiding this comment

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

Do you want to include this link? - https://docs.kernel.org/filesystems/overlayfs.html#index
Might be worth if or when someone revisits this section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I've included that.

@sudo-bmitch sudo-bmitch merged commit 5325ec4 into opencontainers:main Dec 5, 2024
4 checks passed
@sudo-bmitch sudo-bmitch deleted the pr-cross-layer-hardlink branch December 5, 2024 20:52
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.

Does OCI allow "cross-layer hardlinks"? And how should they be handled?
4 participants