From 03306ac1c8eeddda714bd4f98aab05ad62ff829c Mon Sep 17 00:00:00 2001 From: Brandon Mitchell Date: Thu, 24 Oct 2024 16:47:15 -0400 Subject: [PATCH] Hard link limitations in union filesystems Signed-off-by: Brandon Mitchell --- layer.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layer.md b/layer.md index 22dea630..22829065 100644 --- a/layer.md +++ b/layer.md @@ -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. (See the [overlay specification](https://docs.kernel.org/filesystems/overlayfs.html#index) for more details.) +- Extracting a layer with hardlink references to files outside of the layer may fail. - Hardlinks are stored in a tar archive with type of a `1` char, per the [GNU Basic Tar Format][gnu-tar-standard] and [libarchive tar(5)][libarchive-tar]. - While approaches to deriving new or changed hardlinks may vary, a possible approach is: