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

copy: add fast copy path for darwin #66

Merged
merged 1 commit into from
Apr 3, 2019
Merged

copy: add fast copy path for darwin #66

merged 1 commit into from
Apr 3, 2019

Conversation

tonistiigi
Copy link
Owner

Signed-off-by: Tonis Tiigi [email protected]

@tiborvass
Copy link
Collaborator

Should you have an _other.go file with copyFile to avoid compile errors on other platforms for code importing this package?

@tonistiigi
Copy link
Owner Author

It already exists for linux/windows. We don't have any way to test others anyway.

@@ -52,6 +52,21 @@ func (c *copier) copyFileInfo(fi os.FileInfo, name string) error {
return nil
}

func copyFile(source, target string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could call this copyFileNaive in copy.go and call it as a fallback from darwin.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this function is not naive in linux. It does copy_file_range on linux.

@tiborvass tiborvass merged commit 524c23d into master Apr 3, 2019
thaJeztah added a commit to thaJeztah/docker that referenced this pull request Oct 24, 2019
full diff: tonistiigi/fsutil@3bbb99c...3d2716d

- tonistiigi/fsutil#66 copy: add fast copy path for darwin
- tonistiigi/fsutil#67 Treat Unix sockets as regular files

Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah added a commit to thaJeztah/docker that referenced this pull request Jan 13, 2020
full diff: tonistiigi/fsutil@3bbb99c...0f039a0

- tonistiigi/fsutil#66 copy: add fast copy path for darwin
- tonistiigi/fsutil#67 Treat Unix sockets as regular files
    - relates to moby/buildkit#1144 Fix socket handling
- tonistiigi/fsutil#68 fix gocrypto commit
- tonistiigi/fsutil#69 receive: use filter on receive diff
    - prevents incremental transfers with userns because the metadata
      on disk is always different than the one being transferred.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Jan 13, 2020
full diff: tonistiigi/fsutil@3bbb99c...0f039a0

- tonistiigi/fsutil#66 copy: add fast copy path for darwin
- tonistiigi/fsutil#67 Treat Unix sockets as regular files
    - relates to moby/buildkit#1144 Fix socket handling
- tonistiigi/fsutil#68 fix gocrypto commit
- tonistiigi/fsutil#69 receive: use filter on receive diff
    - prevents incremental transfers with userns because the metadata
      on disk is always different than the one being transferred.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Upstream-commit: 94a8c8b3c09540497f6fb7a3d40de80610c920ac
Component: engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants