Browse Source

graphdriver/overlay2: usingMetacopy ENOTSUP is non-fatal

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit 3bcb350711135cab5a16e6f1a917d7caa59ceedf)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
Bjorn Neergaard 2 năm trước cách đây
mục cha
commit
7e03250780
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      daemon/graphdriver/overlay2/check.go

+ 5 - 0
daemon/graphdriver/overlay2/check.go

@@ -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