Displaying 13 results from an estimated 13 matches for "read_sum_head".
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...file_list *flist, int i, int f_out);
void generate_files(int f,struct file_list *flist,char *local_name,int f_recv);
int main(int argc, char *argv[]);
@@ -190,6 +191,7 @@
int report);
void sig_int(void);
void finish_transfer(char *fname, char *fnametmp, struct file_struct *file);
+void read_sum_head(int f, struct sum_struct *sum);
void send_files(struct file_list *flist,int f_out,int f_in);
int try_bind_local(int s,
int ai_family, int ai_socktype,
--- generator.c Sat Mar 29 11:11:30 2003
+++ generator.c Sat Mar 29 12:16:02 2003
@@ -116,13 +116,21 @@
/*
- send a header that says...
2003 Mar 23
1
[RFC] dynamic checksum size
...i;
- unsigned int n,remainder,len,count;
+ struct sum_struct sum;
+ unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
char *data;
@@ -215,9 +216,7 @@
static char file_sum2[MD4_SUM_LENGTH];
char *map=NULL;
- count = read_int(f_in);
- n = read_int(f_in);
- remainder = read_int(f_in);
+ read_sum_head(f_in, &sum);
sum_init();
@@ -247,10 +246,10 @@
}
i = -(i+1);
- offset2 = i*(OFF_T)n;
- len = n;
- if (i == (int) count-1 && remainder != 0)
- len = remainder;
+ offset2 = i*(OFF_T)sum.blength;
+ len = sum.blength;
+ if (i == (int) sum.count-1 && sum.rema...
2008 May 12
3
DO NOT REPLY [Bug 5459] New: Large amount of files makes checksum count negative
...ync
Version: 3.0.2
Platform: x64
OS/Version: Linux
Status: NEW
Severity: major
Priority: P3
Component: core
AssignedTo: wayned@samba.org
ReportedBy: count-linux@flatline.de
QAContact: rsync-qa@samba.org
read_sum_head() in io.c expects the checksum count to be a signed int (most
likely should be long). For large file counts, this can become negative:
receiving file list ...
2289961 files to consider
Invalid checksum count -909869055 [sender]
rsync error: protocol incompatibility (code 2) at io.c(1361) [sender=3...
2003 Dec 20
3
preview release: 2.6.0pre1
OK, I packaged up the current CVS as our first preview release for
2.6.0. You can grab it here:
http://samba.org/ftp/rsync/preview/rsync-2.6.0pre1.tar.gz
The MD5 checksum is:
70e9dea967f083c231b7821ef35aef1b rsync-2.6.0pre1.tar.gz
There is not currently a .sig file for the package, but I'm looking into
that next.
Please test this and let me know if we have any remaining issues
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...local_server;
+extern int local_socket;
extern int relative_paths;
extern int preserve_hard_links;
extern int preserve_perms;
@@ -172,12 +174,24 @@
int32 len, sum_len;
OFF_T offset = 0;
OFF_T offset2;
- char *data;
+ char *data = NULL;
int32 i;
char *map = NULL;
+ int percent = 0;
read_sum_head(f_in, &sum);
+ if (local_server && local_socket && sum.count == 0) {
+ int i = recv_fd(local_socket);
+ rprintf(FINFO,"received file descriptor %d\n", i);
+ if (i <= 0)
+ offset = -1;
+ write_buf(local_socket, (char *)&offset, sizeof(offset));
+ if (i...
2004 May 10
2
read error produces null-byte-filled destination file
I've run into a bug in the IO handling when reading a file. Suppose I
have a file that lives on an NFS filesystem. That filesystem is NOT
being exported with auth=0 permissions. So, if I try to access a file
as root, it successfully opens the file, but subsequent reads fail with
EACCES. This produces a destination file full of null bytes. I
noticed this with 2.5.7, but checked 2.6.2 as
2004 Aug 02
4
reducing memmoves
Attached is a patch that makes window strides constant when files are
walked with a constant block size. In these cases, it completely
avoids all memmoves.
In my simple local test of rsyncing 57MB of 10 local files, memmoved
bytes went from 18MB to zero.
I haven't tested this for a big variety of file cases. I think that this
will always reduce the memmoves involved with walking a large
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
- OFF_T total_size)
+ OFF_T total_size,char *md4)
{
int i;
struct sum_struct sum;
+ struct mdfour mdfour_data;
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
@@ -250,6 +251,8 @@
char *map=NULL;
read_sum_head(f_in, &sum);
+ if (md4)
+ mdfour_begin(&mdfour_data);
sum_init();
@@ -269,6 +272,8 @@
cleanup_got_literal = 1;
sum_update(data,i);
+ if (md4)
+ mdfour_update(&mdfour_data,data,i);
if (fd != -1 && write_file(fd,data,i) != i) {
rprintf(FERR...
2004 Jan 17
1
--delete-sent-files (AKA --move-files)
...nt-files";
*argc = ac;
}
Index: proto.h
--- proto.h 15 Jan 2004 07:42:23 -0000 1.172
+++ proto.h 17 Jan 2004 05:04:55 -0000
@@ -193,6 +193,7 @@ int set_perms(char *fname,struct file_st
void sig_int(void);
void finish_transfer(char *fname, char *fnametmp, struct file_struct *file);
void read_sum_head(int f, struct sum_struct *sum);
+void successful_send(int i);
void send_files(struct file_list *flist, int f_out, int f_in);
int try_bind_local(int s, int ai_family, int ai_socktype,
const char *bind_address);
Index: receiver.c
--- receiver.c 15 Jan 2004 07:42:25 -0000 1.63
+++ receiver.c 1...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname,
- OFF_T total_size)
+ OFF_T total_size,char *md4)
{
int i;
struct sum_struct sum;
+ struct mdfour mdfour_data;
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
@@ -199,7 +200,9 @@
char *map=NULL;
read_sum_head(f_in, &sum);
-
+ if (md4)
+ mdfour_begin(&mdfour_data);
+
sum_init();
while ((i = recv_token(f_in, &data)) != 0) {
@@ -216,6 +219,8 @@
cleanup_got_literal = 1;
sum_update(data,i);
+ if (md4)
+ mdfour_update(&mdfour_data,data,i);
if (fd != -1 && w...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname,
- OFF_T total_size)
+ OFF_T total_size,char *md4)
{
int i;
struct sum_struct sum;
+ struct mdfour mdfour_data;
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
@@ -199,7 +200,9 @@
char *map=NULL;
read_sum_head(f_in, &sum);
-
+ if (md4)
+ mdfour_begin(&mdfour_data);
+
sum_init();
while ((i = recv_token(f_in, &data)) != 0) {
@@ -216,6 +219,8 @@
cleanup_got_literal = 1;
sum_update(data,i);
+ if (md4)
+ mdfour_update(&mdfour_data,data,i);
if (fd != -1 && w...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname,
- OFF_T total_size)
+ OFF_T total_size,char *md4)
{
int i;
struct sum_struct sum;
+ struct mdfour mdfour_data;
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
@@ -199,7 +200,9 @@
char *map=NULL;
read_sum_head(f_in, &sum);
-
+ if (md4)
+ mdfour_begin(&mdfour_data);
+
sum_init();
while ((i = recv_token(f_in, &data)) != 0) {
@@ -216,6 +219,8 @@
cleanup_got_literal = 1;
sum_update(data,i);
+ if (md4)
+ mdfour_update(&mdfour_data,data,i);
if (fd != -1 && w...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname,
- OFF_T total_size)
+ OFF_T total_size,char *md4)
{
int i;
struct sum_struct sum;
+ struct mdfour mdfour_data;
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
@@ -199,7 +200,9 @@
char *map=NULL;
read_sum_head(f_in, &sum);
-
+ if (md4)
+ mdfour_begin(&mdfour_data);
+
sum_init();
while ((i = recv_token(f_in, &data)) != 0) {
@@ -216,6 +219,8 @@
cleanup_got_literal = 1;
sum_update(data,i);
+ if (md4)
+ mdfour_update(&mdfour_data,data,i);
if (fd != -1 && w...