Mercurial > dovecot > core-2.2
changeset 1199:88c0d1c2b3c3 HEAD
mail_read_mmaped = no works now with mbox
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 19 Feb 2003 22:01:55 +0200 |
parents | d28571e8c810 |
children | 57f6989a6b8d |
files | dovecot-example.conf src/lib-index/mbox/mbox-index.c |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/dovecot-example.conf Wed Feb 19 21:55:27 2003 +0200 +++ b/dovecot-example.conf Wed Feb 19 22:01:55 2003 +0200 @@ -249,7 +249,6 @@ # Use mmap() instead of read() to read mail files. read() seems to be a bit # faster with my Linux/x86 and it's better with NFS, so that's the default. -# Currently mmap()ing is forced with mbox - this is a bug and will be fixed. #mail_read_mmaped = no # Copy mail to another folders using hard links. This is much faster than
--- a/src/lib-index/mbox/mbox-index.c Wed Feb 19 21:55:27 2003 +0200 +++ b/src/lib-index/mbox/mbox-index.c Wed Feb 19 22:01:55 2003 +0200 @@ -75,14 +75,13 @@ } if (index->mbox_stream == NULL) { - /* FIXME: breaks expunge */ - /*if (index->mail_read_mmaped) {*/ + if (index->mail_read_mmaped) { index->mbox_stream = i_stream_create_mmap(index->mbox_fd, default_pool, MAIL_MMAP_BLOCK_SIZE, 0, 0, FALSE); - /*} else { + } else { if (lseek(index->mbox_fd, 0, SEEK_SET) < 0) { mbox_set_syscall_error(index, "lseek()"); return NULL; @@ -93,7 +92,7 @@ default_pool, MAIL_READ_BLOCK_SIZE, FALSE); - }*/ + } } i_stream_set_read_limit(index->mbox_stream, 0);