Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.0 backport] d/graphdriver/copy: support src fs w/o xattr support #45465

Merged
merged 1 commit into from May 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions daemon/graphdriver/copy/copy.go
Expand Up @@ -5,6 +5,7 @@ package copy // import "github.com/docker/docker/daemon/graphdriver/copy"

import (
"container/list"
"errors"
"fmt"
"io"
"os"
Expand Down Expand Up @@ -90,6 +91,11 @@ func legacyCopy(srcFile io.Reader, dstFile io.Writer) error {
func copyXattr(srcPath, dstPath, attr string) error {
data, err := system.Lgetxattr(srcPath, attr)
if err != nil {
if errors.Is(err, syscall.EOPNOTSUPP) {
// Task failed successfully: there is no xattr to copy
// if the source filesystem doesn't support xattrs.
return nil
}
return err
}
if data != nil {
Expand Down