Skip to content

Commit

Permalink
Merge pull request #44922 from neersighted/backport/44916/23.0
Browse files Browse the repository at this point in the history
[23.0 backport] graphdriver/overlay2: usingMetacopy ENOTSUP is non-fatal
  • Loading branch information
cpuguy83 committed Feb 4, 2023
2 parents d7573ab + 7e03250 commit 7df2649
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions daemon/graphdriver/overlay2/check.go
Expand Up @@ -188,6 +188,11 @@ func usingMetacopy(d string) (bool, error) {
// ...and check if the pulled-up copy is marked as metadata-only
xattr, err := system.Lgetxattr(filepath.Join(l2, "f"), overlayutils.GetOverlayXattr("metacopy"))
if err != nil {
// ENOTSUP signifies the FS does not support either xattrs or metacopy. In either case,
// it is not a fatal error, and we should report metacopy as unused.
if errors.Is(err, unix.ENOTSUP) {
return false, nil
}
return false, errors.Wrap(err, "metacopy flag was not set on file in the upperdir")
}
usingMetacopy := xattr != nil
Expand Down

0 comments on commit 7df2649

Please sign in to comment.