-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
FileSystem.Unix: improve CopyFile. #59695
Merged
Merged
Commits on Oct 19, 2021
-
FileSystem.Unix: improve CopyFile.
Like the upcoming version of GNU coreutils 'cp' prefer a copy-on-write clone. This shares the physical storage between files, which means no data needs to copied. CoW-clones are supported by a number of Linux file systems, like Btrfs, XFS, and overlayfs. Eliminate a 'stat' call that is always performed for checking if the target is a directory by only performing the check when the 'open' syscall reports an error. Eliminate a 'stat' call for retrieving the file size of the source by passing through the length that was retrieved when checking the opened file is not a directory. Create the destination with file permissions that match the source. We still need to fchmod due to umask being applied to the open mode. When performing a manual copy, limit the allocated buffer for small files. And, avoid the last 'read' call by checking when we've copied the expected nr of bytes.
Configuration menu - View commit details
-
Copy full SHA for e2d3577 - Browse repository at this point
Copy the full SHA e2d3577View commit details
Commits on Oct 20, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 712db40 - Browse repository at this point
Copy the full SHA 712db40View commit details
Commits on Oct 26, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3fd621d - Browse repository at this point
Copy the full SHA 3fd621dView commit details -
Configuration menu - View commit details
-
Copy full SHA for b7ab817 - Browse repository at this point
Copy the full SHA b7ab817View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9be3b2f - Browse repository at this point
Copy the full SHA 9be3b2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e70e52 - Browse repository at this point
Copy the full SHA 4e70e52View commit details
Commits on Oct 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3c95290 - Browse repository at this point
Copy the full SHA 3c95290View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d7cd45 - Browse repository at this point
Copy the full SHA 5d7cd45View commit details -
Configuration menu - View commit details
-
Copy full SHA for b67b262 - Browse repository at this point
Copy the full SHA b67b262View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.