dovecot-2.0: lib-index: Use IO_BLOCK_SIZE

dovecot at dovecot.org dovecot at dovecot.org
Fri May 14 11:53:51 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/2937ca64faa9
changeset: 11310:2937ca64faa9
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 14 10:53:48 2010 +0200
description:
lib-index: Use IO_BLOCK_SIZE

diffstat:

 src/lib-index/mail-cache-lookup.c         |  2 +-
 src/lib-index/mail-index-map-read.c       |  2 +-
 src/lib-index/mail-transaction-log-file.c |  2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 88d7a36c7fa5 -r 2937ca64faa9 src/lib-index/mail-cache-lookup.c
--- a/src/lib-index/mail-cache-lookup.c	Fri May 14 10:40:24 2010 +0200
+++ b/src/lib-index/mail-cache-lookup.c	Fri May 14 10:53:48 2010 +0200
@@ -8,7 +8,7 @@
 
 #include <stdlib.h>
 
-#define CACHE_PREFETCH 1024
+#define CACHE_PREFETCH IO_BLOCK_SIZE
 
 int mail_cache_get_record(struct mail_cache *cache, uint32_t offset,
 			  const struct mail_cache_record **rec_r)
diff -r 88d7a36c7fa5 -r 2937ca64faa9 src/lib-index/mail-index-map-read.c
--- a/src/lib-index/mail-index-map-read.c	Fri May 14 10:40:24 2010 +0200
+++ b/src/lib-index/mail-index-map-read.c	Fri May 14 10:53:48 2010 +0200
@@ -125,7 +125,7 @@
 {
 	struct mail_index *index = map->index;
 	const struct mail_index_header *hdr;
-	unsigned char read_buf[4096];
+	unsigned char read_buf[IO_BLOCK_SIZE];
 	const void *buf;
 	void *data = NULL;
 	ssize_t ret;
diff -r 88d7a36c7fa5 -r 2937ca64faa9 src/lib-index/mail-transaction-log-file.c
--- a/src/lib-index/mail-transaction-log-file.c	Fri May 14 10:40:24 2010 +0200
+++ b/src/lib-index/mail-transaction-log-file.c	Fri May 14 10:53:48 2010 +0200
@@ -12,7 +12,7 @@
 #include "mail-index-modseq.h"
 #include "mail-transaction-log-private.h"
 
-#define LOG_PREFETCH 1024
+#define LOG_PREFETCH IO_BLOCK_SIZE
 #define MEMORY_LOG_NAME "(in-memory transaction log file)"
 
 static int


More information about the dovecot-cvs mailing list