[dovecot-cvs] dovecot/src/lib-index/mbox mbox-rewrite.c,1.46,1.47

cras at procontrol.fi cras at procontrol.fi
Sat Dec 21 12:56:58 EET 2002


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

Modified Files:
	mbox-rewrite.c 
Log Message:
Don't fsck index after we've rewritten mbox - that doesn't gain us anything.
Rather just make sure the index's timestamp differs from mbox file.



Index: mbox-rewrite.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-rewrite.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- mbox-rewrite.c	20 Dec 2002 07:53:52 -0000	1.46
+++ mbox-rewrite.c	21 Dec 2002 10:56:55 -0000	1.47
@@ -1,6 +1,7 @@
 /* Copyright (C) 2002 Timo Sirainen */
 
 #include "lib.h"
+#include "ioloop.h"
 #include "istream.h"
 #include "ostream.h"
 #include "temp-string.h"
@@ -574,10 +575,9 @@
 		   Also, we might as well be shrinking the file, in which
 		   case we can't lose data. */
 		if (fd_copy(tmp_fd, index->mbox_fd, dirty_offset) == 0) {
-			/* all ok, we need to fsck the index next time.
-			   use set_flags because set_lock() would remove it
-			   if we modified it directly */
-			index->set_flags |= MAIL_INDEX_FLAG_FSCK;
+			/* All ok. Just make sure the timestamps of index and
+			   mbox differ, so index will be updated at next sync */
+			index->file_sync_stamp = ioloop_time-61;
 			reset_dirty_flags(index);
 		} else {
 			mbox_set_syscall_error(index, "fd_copy()");




More information about the dovecot-cvs mailing list