Title: gh-81340: Use `copy_file_range` in `shutil.copyfile` copy functions by illia-v · Pull Request #93152 · python/cpython · GitHub
Open Graph Title: gh-81340: Use `copy_file_range` in `shutil.copyfile` copy functions by illia-v · Pull Request #93152 · python/cpython
X Title: gh-81340: Use `copy_file_range` in `shutil.copyfile` copy functions by illia-v · Pull Request #93152 · python/cpython
Description: This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot determine whether any of them are implemented. Therefore, I added an allow_reflink argument in case anyone wants to disable copy-on-write. GNU Coreutils enables copy-on-write by default, that is why I set allow_reflink to true by default (unlike @vstinner proposed in #81338). Note, there is a known copy_file_range bug for copying from special filesystems like procfs and sysfs. It seems not to be fixed yet, so we have to check for a silent copy_file_range fail as Coreutils and Go do. Issue: gh-81340
Open Graph Description: This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot dete...
X Description: This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot dete...
Opengraph URL: https://github.com/python/cpython/pull/93152
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:7112bca8-df9b-03ba-b164-dc9ffe3bb080 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 91B4:1D189C:12CAD90:192383E:6969AE91 |
| html-safe-nonce | 6d2329b8a2807adc44d122fc40892c495b36f437a82a2482d063e13915cc62bd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUI0OjFEMTg5QzoxMkNBRDkwOjE5MjM4M0U6Njk2OUFFOTEiLCJ2aXNpdG9yX2lkIjoiNDIyMzE4MzkwMzAzMjcxNjk0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1e2ae91ac49f39a2b20f8926cab85eab6f7cf1e9a36752d942240a54e4c6a67c |
| hovercard-subject-tag | pull_request:944822682 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/93152/checks |
| twitter:image | https://avatars.githubusercontent.com/u/17710133?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/17710133?s=400&v=4 |
| og:image:alt | This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot dete... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7 |
| turbo-cache-control | no-cache |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 124667f43168afb6c9c03b7c02eb5b1d2e1be3d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width