[dovecot-cvs] dovecot/src/master mail-process.c, 1.38, 1.39 master-settings.c, 1.38, 1.39 master-settings.h, 1.22, 1.23

cras at procontrol.fi cras at procontrol.fi
Wed Apr 28 03:21:03 EEST 2004


Update of /home/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv32334/master

Modified Files:
	mail-process.c master-settings.c master-settings.h 
Log Message:
Forced locking to be right with mprotect()ing index file. Support for
disabling mmap for indexes, and disabling just mmap+write().



Index: mail-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- mail-process.c	20 Sep 2003 18:45:53 -0000	1.38
+++ mail-process.c	28 Apr 2004 00:21:01 -0000	1.39
@@ -261,14 +261,16 @@
 		env_put("MAIL_SAVE_CRLF=1");
 	if (set->mail_read_mmaped)
 		env_put("MAIL_READ_MMAPED=1");
+	if (set->mmap_disable)
+		env_put("MMAP_DISABLE=1");
+	if (set->mmap_no_write)
+		env_put("MMAP_NO_WRITE=1");
 	if (set->maildir_copy_with_hardlinks)
 		env_put("MAILDIR_COPY_WITH_HARDLINKS=1");
 	if (set->maildir_check_content_changes)
 		env_put("MAILDIR_CHECK_CONTENT_CHANGES=1");
 	if (set->mail_full_filesystem_access)
 		env_put("FULL_FILESYSTEM_ACCESS=1");
-	if (set->index_mmap_invalidate)
-		env_put("MMAP_INVALIDATE=1");
 	(void)umask(set->umask);
 
 	env_put(t_strconcat("MBOX_LOCKS=", set->mbox_locks, NULL));

Index: master-settings.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- master-settings.c	19 Jan 2004 17:07:21 -0000	1.38
+++ master-settings.c	28 Apr 2004 00:21:01 -0000	1.39
@@ -88,6 +88,8 @@
 	DEF(SET_INT, mail_max_flag_length),
 	DEF(SET_BOOL, mail_save_crlf),
 	DEF(SET_BOOL, mail_read_mmaped),
+	DEF(SET_BOOL, mmap_disable),
+	DEF(SET_BOOL, mmap_no_write),
 	DEF(SET_BOOL, maildir_copy_with_hardlinks),
 	DEF(SET_BOOL, maildir_check_content_changes),
 	DEF(SET_STR, mbox_locks),
@@ -96,7 +98,6 @@
 	DEF(SET_INT, mbox_dotlock_change_timeout),
 	DEF(SET_INT, umask),
 	DEF(SET_BOOL, mail_drop_priv_before_exec),
-	DEF(SET_BOOL, index_mmap_invalidate),
 
 	DEF(SET_STR, mail_executable),
 	DEF(SET_INT, mail_process_size),
@@ -207,6 +208,12 @@
 	MEMBER(mail_max_flag_length) 50,
 	MEMBER(mail_save_crlf) FALSE,
 	MEMBER(mail_read_mmaped) FALSE,
+	MEMBER(mmap_disable) FALSE,
+#ifdef MMAP_CONFLICTS_WRITE
+	MEMBER(mmap_no_write) TRUE,
+#else
+	MEMBER(mmap_no_write) FALSE,
+#endif
 	MEMBER(maildir_copy_with_hardlinks) FALSE,
 	MEMBER(maildir_check_content_changes) FALSE,
 	MEMBER(mbox_locks) "dotlock fcntl",
@@ -215,11 +222,6 @@
 	MEMBER(mbox_dotlock_change_timeout) 30,
 	MEMBER(umask) 0077,
 	MEMBER(mail_drop_priv_before_exec) FALSE,
-#ifdef NEED_MS_INVALIDATE
-	MEMBER(index_mmap_invalidate) TRUE,
-#else
-	MEMBER(index_mmap_invalidate) FALSE,
-#endif
 
 	MEMBER(mail_executable) PKG_LIBEXECDIR"/imap",
 	MEMBER(mail_process_size) 256,

Index: master-settings.h
===================================================================
RCS file: /home/cvs/dovecot/src/master/master-settings.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- master-settings.h	19 Jan 2004 17:07:21 -0000	1.22
+++ master-settings.h	28 Apr 2004 00:21:01 -0000	1.23
@@ -63,6 +63,8 @@
 	int mail_max_flag_length;
 	int mail_save_crlf;
 	int mail_read_mmaped;
+	int mmap_disable;
+	int mmap_no_write;
 	int maildir_copy_with_hardlinks;
 	int maildir_check_content_changes;
 	const char *mbox_locks;
@@ -71,7 +73,6 @@
 	unsigned int mbox_dotlock_change_timeout;
 	unsigned int umask;
 	int mail_drop_priv_before_exec;
-	int index_mmap_invalidate;
 
 	const char *mail_executable;
 	unsigned int mail_process_size;



More information about the dovecot-cvs mailing list