Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
96d910c7
Commit
96d910c7
authored
Aug 03, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call map_file() with its new args, including a suggested window
size.
parent
7560c17a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
checksum.c
checksum.c
+1
-1
generator.c
generator.c
+2
-2
receiver.c
receiver.c
+2
-1
sender.c
sender.c
+5
-1
No files found.
checksum.c
View file @
96d910c7
...
...
@@ -102,7 +102,7 @@ void file_checksum(char *fname,char *sum,OFF_T size)
if
(
fd
==
-
1
)
return
;
buf
=
map_file
(
fd
,
size
,
CSUM_CHUNK
);
buf
=
map_file
(
fd
,
size
,
CSUM_CHUNK
*
2048
,
0
);
mdfour_begin
(
&
m
);
...
...
generator.c
View file @
96d910c7
...
...
@@ -154,7 +154,7 @@ static void sum_sizes_sqroot(struct sum_struct *sum, uint64 len)
c
>>=
1
;
}
while
(
c
>=
8
);
/* round to multiple of 8 */
blength
=
MAX
(
blength
,
BLOCK_SIZE
);
blength
=
MIN
(
blength
,
MAX_
MAP
_SIZE
);
blength
=
MIN
(
blength
,
MAX_
BLOCK
_SIZE
);
}
if
(
protocol_version
<
27
)
{
...
...
@@ -209,7 +209,7 @@ static void generate_and_send_sums(int fd, OFF_T len, int f_out)
sum_sizes_sqroot
(
&
sum
,
len
);
if
(
len
>
0
)
mapbuf
=
map_file
(
fd
,
len
,
sum
.
blength
);
mapbuf
=
map_file
(
fd
,
len
,
MAX_MAP_SIZE
,
sum
.
blength
);
else
mapbuf
=
NULL
;
...
...
receiver.c
View file @
96d910c7
...
...
@@ -222,7 +222,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
read_sum_head
(
f_in
,
&
sum
);
if
(
fd_r
>=
0
&&
size_r
>
0
)
{
mapbuf
=
map_file
(
fd_r
,
size_r
,
sum
.
blength
);
OFF_T
map_size
=
MAX
(
sum
.
blength
*
2
,
16
*
1024
);
mapbuf
=
map_file
(
fd_r
,
size_r
,
map_size
,
sum
.
blength
);
if
(
verbose
>
2
)
{
rprintf
(
FINFO
,
"recv mapped %s of size %.0f
\n
"
,
safe_fname
(
fname_r
),
(
double
)
size_r
);
...
...
sender.c
View file @
96d910c7
...
...
@@ -208,7 +208,11 @@ void send_files(struct file_list *flist, int f_out, int f_in)
return
;
}
mbuf
=
st
.
st_size
?
map_file
(
fd
,
st
.
st_size
,
s
->
blength
)
:
NULL
;
if
(
st
.
st_size
)
{
OFF_T
map_size
=
MAX
(
s
->
blength
*
3
,
MAX_MAP_SIZE
);
mbuf
=
map_file
(
fd
,
st
.
st_size
,
map_size
,
s
->
blength
);
}
else
mbuf
=
NULL
;
if
(
verbose
>
2
)
{
rprintf
(
FINFO
,
"send_files mapped %s of size %.0f
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment