[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-uidlist.c, 1.58, 1.59

tss at dovecot.org tss at dovecot.org
Tue Jan 23 13:49:01 UTC 2007


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

Modified Files:
	maildir-uidlist.c 
Log Message:
Made one more fsync() optional with fsync_disable.



Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- maildir-uidlist.c	18 Jan 2007 17:20:49 -0000	1.58
+++ maildir-uidlist.c	23 Jan 2007 13:48:58 -0000	1.59
@@ -610,10 +610,12 @@
 		return -1;
 	}
 
-	if (fsync(uidlist->lock_fd) < 0) {
-		mail_storage_set_critical(storage,
-			"fsync(%s) failed: %m", temp_path);
-		return -1;
+	if (!uidlist->mbox->ibox.fsync_disable) {
+		if (fsync(uidlist->lock_fd) < 0) {
+			mail_storage_set_critical(storage,
+				"fsync(%s) failed: %m", temp_path);
+			return -1;
+		}
 	}
 
 	return 0;



More information about the dovecot-cvs mailing list