[Bug 8478] Add an option to skip open files

samba-bugs at samba.org samba-bugs at samba.org
Mon Sep 26 17:15:26 MDT 2011


https://bugzilla.samba.org/show_bug.cgi?id=8478

Devin Nate <devin.nate at cloudwerx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6932|0                           |1
        is obsolete|                            |

--- Comment #1 from Devin Nate <devin.nate at cloudwerx.com> 2011-09-26 23:15:26 UTC ---
Created attachment 6950
  --> https://bugzilla.samba.org/attachment.cgi?id=6950
second version of patch

Second version of the patch. I should note this is a very cygwin specific
patch, and designed as such. I'd be surprised if this is of any value on a
Unix/Linux system. Nevertheless, it does what we need, and I've seen some
google requests for it, so it is contributed back. I wouldn't expect it to hit
mainline rsync.

Basically, in cygwin, if a file is not-unlinkable, then a freshly created
link() to that file is equally un-linkable. This patch sets up a directory
(.rsync-tmp) and prior to processing any file creates a link(), then attempts
an unlink(). If anything fails, it skips. Linux does not exhibit this behavior.

Also, for extra safety, it performs a flock() to get an exclusive lock, then
immediately unlocks.

Thanks,
Devin

-- 
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