overlay: make userxattr,metacopy=on debug message

currently the kernel doesn't support both userxattr and metacopy=on
options.  When they are specified the mount fails with EINVAL.

Downgrade the warning message to debug level when running as
rootless.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2021-06-03 22:40:08 +02:00
parent 337b402f35
commit 9fe9a376d0
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED
1 changed files with 5 additions and 1 deletions

View File

@ -1189,7 +1189,11 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
if d.usingMetacopy {
optsList = append(optsList, "metacopy=on")
} else {
logrus.Warnf("ignoring metacopy option from storage.conf, not supported with booted kernel")
logLevel := logrus.WarnLevel
if unshare.IsRootless() {
logLevel = logrus.DebugLevel
}
logrus.StandardLogger().Logf(logLevel, "ignoring metacopy option from storage.conf, not supported with booted kernel")
}
}
}