[Bug 8847] New: detect-renamed.diff update to ensure existence of directory for partial-dir
samba-bugs at samba.org
samba-bugs at samba.org
Thu Apr 5 14:52:28 MDT 2012
https://bugzilla.samba.org/show_bug.cgi?id=8847
Summary: detect-renamed.diff update to ensure existence of
directory for partial-dir
Product: rsync
Version: 3.0.9
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: rsnc at opal.com
QAContact: rsync-qa at samba.org
Created attachment 7435
--> https://bugzilla.samba.org/attachment.cgi?id=7435
replacement for patches/detect-renamed.diff
When using --detect-renamed, rsync creates "partial-dir"s for use as a place to
hold files being deleted as part of a rename. These held-files are then used
as the basis files for the files being renamed. If the file is indeed being
renamed, this use provides significant bandwidth savings in that the file does
not need to be re-uploaded.
By default, the partial-dir is a directory called ".~tmp~" that will be created
in the directory of the renamed file.
As described by an earlier developer of detect-renamed.diff <a
href="http://lists.samba.org/archive/rsync/2007-December/019469.html">here</a>,
there exist circumstances when the partial-dir cannot be created because the
directory for it does not yet exist. This is the case when a directory is
renamed or a file is moved to a new directory. In such cases, which are, in
fact, quite common, detect-rename fails because the new directory does not
exist when rsync tries to create the partial dir. So, the file(s) in question
are re-uploaded instead of being detected as renamed existing files.
The attached update to detect-renamed.diff addresses this problem by ensuring
that the needed directories for partial-dir are created. This is done by use
of the equivalent of "mkdir -p" when creating the partial-dir. A new function,
do_mkdir_path(), is provided in syscall.c that recursively creates any needed
directories.
With this change, detect-renamed properly detects files moved to new
directories as well as directory renames.
The attached detect-renamed.diff replaces the current file.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the rsync
mailing list