The branch, master has been updated
       via  7d7538d Fix error in write_sparse() on incomplete write.
      from  de94193 Remove bypassed checksums in --inplace to improve speed.

;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 7d7538d43c360750b6dd13019eb07c914d880bd8
Author: Wayne Davison <way...@samba.org>
Date:   Mon Sep 16 09:00:53 2013 -0700

    Fix error in write_sparse() on incomplete write.
    
    Fix a problem where sparse_seek could get left non-zero when we
    did not finish writing all the data that would take us to that
    sparse gap.  Issue pointed out by David Taylor.

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

Summary of changes:
 fileio.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/fileio.c b/fileio.c
index 0e20714..78decee 100644
--- a/fileio.c
+++ b/fileio.c
@@ -84,11 +84,14 @@ static int write_sparse(int f, char *buf, int len)
        while ((ret = write(f, buf + l1, len - (l1+l2))) <= 0) {
                if (ret < 0 && errno == EINTR)
                        continue;
+               sparse_seek = 0;
                return ret;
        }
 
-       if (ret != (int)(len - (l1+l2)))
+       if (ret != (int)(len - (l1+l2))) {
+               sparse_seek = 0;
                return l1+ret;
+       }
 
        return len;
 }


-- 
The rsync repository.
_______________________________________________
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs

Reply via email to