]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Use IO_BLOCK_SIZE
authorTimo Sirainen <tss@iki.fi>
Fri, 14 May 2010 08:53:48 +0000 (10:53 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 14 May 2010 08:53:48 +0000 (10:53 +0200)
--HG--
branch : HEAD

src/lib-index/mail-cache-lookup.c
src/lib-index/mail-index-map-read.c
src/lib-index/mail-transaction-log-file.c

index 126bcec3e612097e7b5605cf0a7cd5b385ee5a72..38a837183bc999e671c1d9e7297cb1f5ca75eaee 100644 (file)
@@ -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)
index 16fc2fe799e4196b775a958f9c85508c9f30ef0b..d7af48788b5d619a6d098005a4ebf373199c3c38 100644 (file)
@@ -125,7 +125,7 @@ mail_index_try_read_map(struct mail_index_map *map,
 {
        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;
index 2fb34b638bde19c6695e320d21f11e3893f14709..9d7c2f4a50db09402d5dc35b1be3a5676d2ab976 100644 (file)
@@ -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