mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
overlay2: better documentation of user namespace behavior when checking native diff support
Signed-off-by: Jonas Geiler <git@jonasgeiler.com>
This commit is contained in:
@@ -22,9 +22,9 @@ import (
|
||||
// directory or the kernel enable CONFIG_OVERLAY_FS_REDIRECT_DIR.
|
||||
// When these exist naive diff should be used.
|
||||
//
|
||||
// When running in a user namespace before kernel 5.11, returns
|
||||
// errRunningInUserNS immediately. In kernel 5.11 and later, we
|
||||
// check support as usual with some user namespace differences.
|
||||
// When running in a user namespace it either immediately returns with an error
|
||||
// when userxattr is not supported, or performs the native diff checks as usual
|
||||
// with some minor user namespace differences, like adding userxattr.
|
||||
func doesSupportNativeDiff(d string) error {
|
||||
userxattr := false
|
||||
if userns.RunningInUserNS() {
|
||||
|
||||
Reference in New Issue
Block a user