samba-bugs@samba.org
2007-Oct-28 04:25 UTC
DO NOT REPLY [Bug 5051] New: --copy-dest copies should use a temporary file unless --inplace
https://bugzilla.samba.org/show_bug.cgi?id=5051 Summary: --copy-dest copies should use a temporary file unless -- inplace Product: rsync Version: 3.0.0 Platform: x86 OS/Version: Linux Status: NEW Severity: minor Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: matt@mattmccutchen.net QAContact: rsync-qa@samba.org Currently, --copy-dest local copies use copy_file(), which writes the destination file at its final name. I think these copies should use a temporary file unless --inplace is given, just like ordinary file transfers. Users who have a program that watches the destination and processes non-temporary files when they appear will appreciate this. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2007-Oct-28 05:19 UTC
DO NOT REPLY [Bug 5051] --copy-dest copies should use a temporary file unless --inplace
https://bugzilla.samba.org/show_bug.cgi?id=5051 ------- Comment #1 from matt@mattmccutchen.net 2007-10-28 00:19 CST ------- Created an attachment (id=2956) --> (https://bugzilla.samba.org/attachment.cgi?id=2956&action=view) Attempt to implement temporary file usage, etc. In this patch I did the following: - Factored out temporary file creation code from recv_files -> open_tmpfile - Took the opportunity to reduce code duplication in recv_files - Added an argument to copy_file to make it write to an existing fd instead of opening its own; updated existing calls - Wrote new logic for local copies in do_local_copy, using open_tmpfile and the new copy_file mode when !inplace - Took the opportunity to implement cleanup for partially written local-copy targets This patch is a first draft; it seems to work, but it could probably use further testing and cleanup. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2007-Oct-29 20:49 UTC
DO NOT REPLY [Bug 5051] --copy-dest copies should use a temporary file unless --inplace
https://bugzilla.samba.org/show_bug.cgi?id=5051 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from wayned@samba.org 2007-10-29 15:49 CST ------- Good idea. Thanks for the cleanup patch too. I've gone over it, made a few tweaks, and checked-in the result. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Possibly Parallel Threads
- DO NOT REPLY [Bug 5147] New: Read-only files that have changed xattrs fail to allow xattr changes
- DO NOT REPLY [Bug 5201] New: Rsync lets user corrupt dest by applying non-inplace batch in inplace mode
- DO NOT REPLY [Bug 5050] New: rsync tries to --copy-dest in --dry-run mode
- DO NOT REPLY [Bug 4079] New: rsync fails with --inplace, --link-dest and --no-whole-file
- DO NOT REPLY [Bug 6378] New: "rsync -v -rsync -v --inplace --progress --rsh=ssh -a" reports erroneous and completely unrealistic transferred size