[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.101, 1.102 mbox-sync.c, 1.194, 1.195

tss at dovecot.org tss at dovecot.org
Sun Dec 17 16:35:36 UTC 2006


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

Modified Files:
	mbox-save.c mbox-sync.c 
Log Message:
Added fsync_disable setting. Also added missing fsync()ing to dbox when
saving mails.



Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- mbox-save.c	15 Dec 2006 18:38:22 -0000	1.101
+++ mbox-save.c	17 Dec 2006 16:35:34 -0000	1.102
@@ -623,7 +623,7 @@
 	}
 
 	if (!ctx->synced && ctx->mbox->mbox_fd != -1 &&
-	    !ctx->mbox->mbox_writeonly) {
+	    !ctx->mbox->mbox_writeonly && !ctx->mbox->ibox.fsync_disable) {
 		if (fdatasync(ctx->mbox->mbox_fd) < 0) {
 			mbox_set_syscall_error(ctx->mbox, "fdatasync()");
 			ret = -1;

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -d -r1.194 -r1.195
--- mbox-sync.c	10 Dec 2006 13:01:35 -0000	1.194
+++ mbox-sync.c	17 Dec 2006 16:35:34 -0000	1.195
@@ -1758,7 +1758,7 @@
 	}
 
 	if (ret == 0 && mbox->mbox_lock_type == F_WRLCK &&
-	    !mbox->mbox_writeonly) {
+	    !mbox->mbox_writeonly && !mbox->ibox.fsync_disable) {
 		if (fsync(mbox->mbox_fd) < 0) {
 			mbox_set_syscall_error(mbox, "fsync()");
 			ret = -1;



More information about the dovecot-cvs mailing list