The Samba-Bugzilla – Attachment 573 Details for
Bug 1463
poor performance with large block size
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Improved patch
map_ptr.patch (text/plain), 1.51 KB, created by
Wayne Davison
on 2004-07-16 10:57:11 UTC
(
hide
)
Description:
Improved patch
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2004-07-16 10:57:11 UTC
Size:
1.51 KB
patch
obsolete
>--- fileio.c 16 Jul 2004 01:32:02 -0000 1.13 >+++ fileio.c 16 Jul 2004 01:58:34 -0000 >@@ -24,6 +24,8 @@ > > extern int sparse_files; > >+unsigned int max_map_size = MAX_MAP_SIZE; >+ > static char last_byte; > static int last_sparse; > >@@ -186,7 +188,7 @@ char *map_ptr(struct map_struct *map,OFF > } else { > window_start = 0; > } >- window_size = MAX_MAP_SIZE; >+ window_size = max_map_size; > if (window_start + window_size > map->file_size) { > window_size = map->file_size - window_start; > } >--- generator.c 15 Jul 2004 02:20:08 -0000 1.97 >+++ generator.c 16 Jul 2004 01:58:34 -0000 >@@ -52,6 +52,7 @@ extern int only_existing; > extern int orig_umask; > extern int safe_symlinks; > extern unsigned int block_size; >+extern unsigned int max_map_size; > > extern struct exclude_list_struct server_exclude_list; > >@@ -162,7 +163,9 @@ static void sum_sizes_sqroot(struct sum_ > c >>= 1; > } while (c >= 8); /* round to multiple of 8 */ > blength = MAX(blength, BLOCK_SIZE); >+ blength = MIN(blength, MAX_MAP_SIZE); > } >+ max_map_size = MIN(MAX_MAP_SIZE, blength * 32); > > if (protocol_version < 27) { > s2length = csum_length; >--- options.c 15 Jul 2004 19:06:32 -0000 1.160 >+++ options.c 16 Jul 2004 01:58:34 -0000 >@@ -635,6 +635,12 @@ int parse_arguments(int *argc, const cha > } > #endif > >+ if (block_size > MAX_MAP_SIZE) { >+ rprintf(FINFO, "limiting block-size to %d bytes\n", >+ MAX_MAP_SIZE); >+ block_size = MAX_MAP_SIZE; >+ } >+ > if (write_batch && read_batch) { > rprintf(FERROR, > "write-batch and read-batch can not be used together\n");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1463
:
543
| 573