[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sun Jun 2 13:39:31 MDT 2013


The branch, master has been updated
       via  0ab8e16 Avoid preallocation on inplace file that is already long enough.
      from  1e9ee19 Look for got_kill_signal in a couple more spots.

;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0ab8e166f44940dad79e8b80ae0b960336efa10c
Author: Wayne Davison <wayned at samba.org>
Date:   Sun Jun 2 12:37:48 2013 -0700

    Avoid preallocation on inplace file that is already long enough.

-----------------------------------------------------------------------

Summary of changes:
 receiver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/receiver.c b/receiver.c
index 5ba370b..622f462 100644
--- a/receiver.c
+++ b/receiver.c
@@ -241,7 +241,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
 	OFF_T preallocated_len = 0;
 #endif
 
-	if (preallocate_files && fd != -1 && total_size > 0) {
+	if (preallocate_files && fd != -1 && total_size > 0 && (!inplace || total_size > size_r)) {
 		/* Try to preallocate enough space for file's eventual length.  Can
 		 * reduce fragmentation on filesystems like ext4, xfs, and NTFS. */
 		if (do_fallocate(fd, 0, total_size) == 0) {


-- 
The rsync repository.


More information about the rsync-cvs mailing list