[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.181.2.9, 1.181.2.10

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


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

Modified Files:
      Tag: branch_1_0
	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.181.2.9
retrieving revision 1.181.2.10
diff -u -d -r1.181.2.9 -r1.181.2.10
--- mbox-sync.c	22 Jan 2007 12:44:11 -0000	1.181.2.9
+++ mbox-sync.c	6 Feb 2007 19:51:09 -0000	1.181.2.10
@@ -1777,14 +1777,6 @@
                 ret = mbox_rewrite_base_uid_last(&sync_ctx);
 	}
 
-	if (ret == 0 && mbox->mbox_lock_type == F_WRLCK &&
-	    !mbox->mbox_writeonly) {
-		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