[dovecot-cvs] dovecot/src/lib-index/mbox mbox-rebuild.c,1.23,1.24
cras at procontrol.fi
cras at procontrol.fi
Wed Apr 23 21:07:25 EEST 2003
Update of /home/cvs/dovecot/src/lib-index/mbox
In directory danu:/tmp/cvs-serv29316/mbox
Modified Files:
mbox-rebuild.c
Log Message:
Don't call msync() with with in-memory indexes.
Index: mbox-rebuild.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-rebuild.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mbox-rebuild.c 6 Mar 2003 19:23:45 -0000 1.23
+++ mbox-rebuild.c 23 Apr 2003 17:07:23 -0000 1.24
@@ -32,9 +32,11 @@
if (index->opened)
index->inconsistent = TRUE;
- if (msync(index->mmap_base,
- sizeof(struct mail_index_header), MS_SYNC) < 0)
- return index_set_syscall_error(index, "msync()");
+ if (!index->anon_mmap) {
+ if (msync(index->mmap_base,
+ sizeof(struct mail_index_header), MS_SYNC) < 0)
+ return index_set_syscall_error(index, "msync()");
+ }
/* reset data file */
if (!mail_index_data_reset(index->data))
More information about the dovecot-cvs
mailing list