Skip to content

drivers.ChownPathByMaps(): preserve directory ModTimes#880

Open
nalind wants to merge 1 commit into
podman-container-tools:mainfrom
nalind:chown-preserve-modtime
Open

drivers.ChownPathByMaps(): preserve directory ModTimes#880
nalind wants to merge 1 commit into
podman-container-tools:mainfrom
nalind:chown-preserve-modtime

Conversation

@nalind
Copy link
Copy Markdown
Contributor

@nalind nalind commented May 27, 2026

When changing the ownership throughout a directory tree, make notes of the initial values of the ModTime for directories that we process.

When removing and re-creating hard links to pick up an ownership change, or changing the owner of an directory, note the name of the directory containing the hard link, or of the directory itself.

After changing the ownership throughout a directory tree, walk the list of directories whose timestamps we expect to have modified, and if their ModTime values were changed, restore them.

@github-actions github-actions Bot added the storage Related to "storage" package label May 27, 2026
@nalind nalind force-pushed the chown-preserve-modtime branch from bd2d6f1 to 298e936 Compare May 27, 2026 18:37
When changing the ownership throughout a directory tree, make notes of
the initial values of the ModTime for directories that we process.

When removing and re-creating hard links to pick up an ownership change,
or changing the owner of an directory, note the name of the directory
containing the hard link, or of the directory itself.

After changing the ownership throughout a directory tree, walk the list
of directories whose timestamps we expect to have modified, and if
their ModTime values were changed, restore them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@nalind nalind force-pushed the chown-preserve-modtime branch from 298e936 to 9027558 Compare May 27, 2026 19:24
@nalind
Copy link
Copy Markdown
Contributor Author

nalind commented May 27, 2026

Tests with fuse-overlayfs appear to be stumbling on containers/fuse-overlayfs#400. Do we need to skip the new tests in that configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant