[dovecot-cvs] dovecot/src/lib-index mail-index.h,1.75,1.76

cras at procontrol.fi cras at procontrol.fi
Sun May 18 16:26:08 EEST 2003


Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv23020/lib-index

Modified Files:
	mail-index.h 
Log Message:
Maildir syncing updates: it's now faster, it handles read-only folders, it
handles many out of disk space conditions (uidlist doesn't) and all commands
finally handle the condition when maildir filename was renamed after
our syncing but before we had the chance to open it.



Index: mail-index.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- mail-index.h	17 May 2003 13:09:54 -0000	1.75
+++ mail-index.h	18 May 2003 12:26:06 -0000	1.76
@@ -69,9 +69,12 @@
 	INDEX_MAIL_FLAG_BINARY_HEADER	= 0x0001,
 	INDEX_MAIL_FLAG_BINARY_BODY	= 0x0002,
 
-	/* Currently this means with mbox format that message flags have
-	   been changed in index, but not written into mbox file yet. */
-	INDEX_MAIL_FLAG_DIRTY		= 0x0004
+	/* Mail flags have been changed in index, but not written into
+	   actual mailbox yet. */
+	INDEX_MAIL_FLAG_DIRTY		= 0x0004,
+
+	/* Maildir: Mail file is in new/ dir instead of cur/ */
+	INDEX_MAIL_FLAG_MAILDIR_NEW	= 0x0008
 };
 
 enum mail_lock_type {
@@ -394,8 +397,11 @@
 	ino_t mbox_ino;
 
 	/* last maildir sync: */
-	time_t uidlist_mtime;
+	time_t last_new_mtime, last_cur_mtime, last_uidlist_mtime;
+	time_t maildir_cur_dirty;
 	int maildir_lock_fd;
+	pool_t new_filename_pool;
+	struct hash_table *new_filenames;
 
 	int fd; /* opened index file */
 	char *error; /* last error message */
@@ -428,6 +434,8 @@
 	unsigned int allow_new_custom_flags:1;
 	unsigned int mailbox_readonly:1;
 	unsigned int mailbox_lock_timeout:1;
+	unsigned int maildir_keep_new:1;
+	unsigned int maildir_have_new:1;
 };
 
 #ifdef DEV_T_STRUCT
@@ -443,7 +451,8 @@
 	0, 0, 0, 0, 0, 0, { 0, 0, 0 }, 0, 0, \
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-	0, 0, 0, 0, 0, 0, 0, 0
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0
 #endif
 
 /* defaults - same as above but prefixed with mail_index_. */



More information about the dovecot-cvs mailing list