[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.105, 1.106 mbox-sync.c, 1.128, 1.129 mbox-transaction.c, 1.9, 1.10

cras at dovecot.org cras at dovecot.org
Wed Dec 15 19:02:02 EET 2004


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv21247/src/lib-storage/index/mbox

Modified Files:
	mbox-storage.c mbox-sync.c mbox-transaction.c 
Log Message:
Added mbox_very_dirty_syncs setting.



Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- mbox-storage.c	14 Dec 2004 03:03:56 -0000	1.105
+++ mbox-storage.c	15 Dec 2004 17:02:00 -0000	1.106
@@ -411,7 +411,9 @@
 
 	ibox->is_recent = mbox_mail_is_recent;
 	ibox->mail_interface = &mbox_mail;
-        ibox->mbox_do_dirty_syncs = getenv("MBOX_DIRTY_SYNCS") != NULL;
+        ibox->mbox_very_dirty_syncs = getenv("MBOX_VERY_DIRTY_SYNCS") != NULL;
+	ibox->mbox_do_dirty_syncs = ibox->mbox_very_dirty_syncs ||
+		getenv("MBOX_DIRTY_SYNCS") != NULL;
 
 	ibox->md5hdr_ext_idx =
 		mail_index_ext_register(ibox->index, "header-md5", 0, 16, 1);

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- mbox-sync.c	14 Dec 2004 03:03:35 -0000	1.128
+++ mbox-sync.c	15 Dec 2004 17:02:00 -0000	1.129
@@ -1459,7 +1459,8 @@
 
 	if ((flags & MAILBOX_SYNC_FLAG_FAST) == 0 ||
 	    ibox->sync_last_check + MAILBOX_FULL_SYNC_INTERVAL <= ioloop_time) {
-		if ((flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0)
+		if ((flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0 &&
+		    !ibox->mbox_very_dirty_syncs)
 			mbox_sync_flags |= MBOX_SYNC_UNDIRTY;
 		if ((flags & MAILBOX_SYNC_FLAG_FULL_WRITE) != 0)
 			mbox_sync_flags |= MBOX_SYNC_REWRITE;

Index: mbox-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-transaction.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mbox-transaction.c	10 Oct 2004 17:44:54 -0000	1.9
+++ mbox-transaction.c	15 Dec 2004 17:02:00 -0000	1.10
@@ -45,7 +45,8 @@
 
 	if (ret == 0) {
 		enum mbox_sync_flags mbox_sync_flags = MBOX_SYNC_LAST_COMMIT;
-		if ((flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0)
+		if ((flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0 &&
+		    !ibox->mbox_very_dirty_syncs)
 			mbox_sync_flags |= MBOX_SYNC_UNDIRTY;
 		if ((flags & MAILBOX_SYNC_FLAG_FULL_WRITE) != 0)
 			mbox_sync_flags |= MBOX_SYNC_REWRITE;



More information about the dovecot-cvs mailing list