[dovecot-cvs] dovecot/src/imap cmd-append.c, 1.33, 1.34 cmd-copy.c, 1.17, 1.18 cmd-select.c, 1.24, 1.25 cmd-status.c, 1.15, 1.16 common.h, 1.11, 1.12 imap-search.h, 1.3, 1.4 main.c, 1.43, 1.44

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


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

Modified Files:
	cmd-append.c cmd-copy.c cmd-select.c cmd-status.c common.h 
	imap-search.h main.c 
Log Message:
Forced locking to be right with mprotect()ing index file. Support for
disabling mmap for indexes, and disabling just mmap+write().



Index: cmd-append.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- cmd-append.c	27 Apr 2004 20:25:52 -0000	1.33
+++ cmd-append.c	28 Apr 2004 00:21:00 -0000	1.34
@@ -72,8 +72,7 @@
 	if (storage == NULL)
 		return TRUE;
 
-	box = mailbox_open(storage, mailbox,
-			   mailbox_open_flags | MAILBOX_OPEN_FAST);
+	box = mailbox_open(storage, mailbox, MAILBOX_OPEN_FAST);
 	if (box == NULL) {
 		client_send_storage_error(client, storage);
 		return TRUE;

Index: cmd-copy.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-copy.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cmd-copy.c	27 Apr 2004 20:25:52 -0000	1.17
+++ cmd-copy.c	28 Apr 2004 00:21:00 -0000	1.18
@@ -74,8 +74,7 @@
 	if (storage == NULL)
 		return TRUE;
 
-	destbox = mailbox_open(storage, mailbox,
-			       mailbox_open_flags | MAILBOX_OPEN_FAST);
+	destbox = mailbox_open(storage, mailbox, MAILBOX_OPEN_FAST);
 	if (destbox == NULL) {
 		client_send_storage_error(client, storage);
 		return TRUE;

Index: cmd-select.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-select.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- cmd-select.c	27 Apr 2004 20:25:52 -0000	1.24
+++ cmd-select.c	28 Apr 2004 00:21:00 -0000	1.25
@@ -8,7 +8,6 @@
 	struct mail_storage *storage;
 	struct mailbox *box;
 	struct mailbox_status status;
-	enum mailbox_open_flags flags;
 	const char *mailbox;
 
 	/* <mailbox> */
@@ -28,10 +27,8 @@
 	if (storage == NULL)
 		return TRUE;
 
-	flags = mailbox_open_flags;
-	if (readonly)
-		flags |= MAILBOX_OPEN_READONLY;
-	box = mailbox_open(storage, mailbox, flags);
+	box = mailbox_open(storage, mailbox,
+			   readonly ? MAILBOX_OPEN_READONLY : 0);
 	if (box == NULL) {
 		client_send_storage_error(client, storage);
 		return TRUE;

Index: cmd-status.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-status.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- cmd-status.c	27 Apr 2004 20:25:52 -0000	1.15
+++ cmd-status.c	28 Apr 2004 00:21:00 -0000	1.16
@@ -65,8 +65,8 @@
 		box = client->mailbox;
 	} else {
 		/* open the mailbox */
-		box = mailbox_open(storage, mailbox, mailbox_open_flags |
-				   MAILBOX_OPEN_FAST | MAILBOX_OPEN_READONLY);
+		box = mailbox_open(storage, mailbox, MAILBOX_OPEN_FAST |
+				   MAILBOX_OPEN_READONLY);
 		if (box == NULL)
 			return FALSE;
 	}

Index: common.h
===================================================================
RCS file: /home/cvs/dovecot/src/imap/common.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- common.h	26 Jul 2003 18:22:44 -0000	1.11
+++ common.h	28 Apr 2004 00:21:00 -0000	1.12
@@ -17,7 +17,6 @@
 extern struct ioloop *ioloop;
 extern unsigned int max_custom_flag_length, mailbox_check_interval;
 extern unsigned int imap_max_line_length;
-extern enum mailbox_open_flags mailbox_open_flags;
 
 extern string_t *capability_string;
 

Index: imap-search.h
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-search.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- imap-search.h	27 Apr 2004 20:25:52 -0000	1.3
+++ imap-search.h	28 Apr 2004 00:21:00 -0000	1.4
@@ -3,6 +3,7 @@
 
 struct imap_arg;
 struct mailbox;
+struct client;
 
 /* Builds search arguments based on IMAP arguments. */
 struct mail_search_arg *

Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- main.c	20 Aug 2003 23:24:29 -0000	1.43
+++ main.c	28 Apr 2004 00:21:00 -0000	1.44
@@ -24,7 +24,6 @@
 struct ioloop *ioloop;
 unsigned int max_custom_flag_length, mailbox_check_interval;
 unsigned int imap_max_line_length;
-enum mailbox_open_flags mailbox_open_flags;
 
 static struct module *modules;
 static char log_prefix[128]; /* syslog() needs this to be permanent */
@@ -123,9 +122,6 @@
 	mailbox_check_interval = str == NULL ? 0 :
 		(unsigned int)strtoul(str, NULL, 10);
 
-	mailbox_open_flags = getenv("MMAP_INVALIDATE") != NULL ?
-		MAILBOX_OPEN_MMAP_INVALIDATE : 0;
-
 	namespace_pool = pool_alloconly_create("namespaces", 1024);
 	client = client_create(0, 1, namespace_init(namespace_pool, user));
 



More information about the dovecot-cvs mailing list