-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
Documenting that the new (3.14) pathlib
copy functionality uses Copy-on-Write
#124985
Comments
I'm not sure to follow what you want to do. What I understood is that you want us to document how we support CoW filesystems (by the way, the project you linked only support Python 3.7 according to pypi and I don't know why it would be a "keyword"). cc @barneygale as the PR's author |
pathlib
docpathlib
copy functionality uses Copy-on-Write
Please document that copies are CoW if the filesystem is CoW and list the supported filesystems, so that one is certain to provide CoW to the end user. Please leave out the implementation details (the exact syscalls). Sorry for the confusion. |
I'm cautious about touting the speed benefits of |
Very good point. Without touching on |
(Off-topic: there even was an actual proposal at btrfs, the most used CoW fs on Linux, to CoW-copy an arbitrary directory with a single syscall. The proposal stalled, but showed that this is doable.) |
#125419 will solve the known |
Documentation
(edited)
The PR 119058 and 122369 added
pathlib.Path.copy()
, with Copy-on-Write support. CoW should be documented, because it has distinctive, user-requested properties on huge files.In the context of a Linux VM manager, CoW is an explicit desired property. Disk image copying is the slowest part of snapshotting a VM. Users expect CoW snapshots nowadays, and intentionally set up a CoW filesystem for the disk image directory.
For clarity, I'm not asking to mention
FICLONE
specifically. I'm not asking to mentioncopy_file_range
, a micro-optimization on the traditional copy algorithm. Instead, my point is that switching from O(file size) to zero is a user-visible feature.Keywords: reflink copy
Linked PRs
pathlib.Path.copy()
uses copy-on-write. #125861The text was updated successfully, but these errors were encountered: