[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.197, 1.198

tss at dovecot.org tss at dovecot.org
Tue Feb 6 19:51:15 UTC 2007


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

Modified Files:
	mbox-sync.c 
Log Message:
Removed fsync() call. It doesn't really provide any data integrity
guarantees, and it could make the performance worse.



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -d -r1.197 -r1.198
--- mbox-sync.c	22 Jan 2007 12:44:15 -0000	1.197
+++ mbox-sync.c	6 Feb 2007 19:51:13 -0000	1.198
@@ -1771,14 +1771,6 @@
                 ret = mbox_rewrite_base_uid_last(&sync_ctx);
 	}
 
-	if (ret == 0 && mbox->mbox_lock_type == F_WRLCK &&
-	    !mbox->mbox_writeonly && !mbox->ibox.fsync_disable) {
-		if (fsync(mbox->mbox_fd) < 0) {
-			mbox_set_syscall_error(mbox, "fsync()");
-			ret = -1;
-		}
-	}
-
 	if (lock_id != 0 && mbox->mbox_lock_type != F_RDLCK) {
 		/* drop to read lock */
 		unsigned int read_lock_id = 0;



More information about the dovecot-cvs mailing list