dovecot-2.0: mbox: Removed unused MBOX_SYNC_LAST_COMMIT and rela...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jul 31 02:42:48 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/1b537cceb640
changeset: 9703:1b537cceb640
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jul 30 19:42:41 2009 -0400
description:
mbox: Removed unused MBOX_SYNC_LAST_COMMIT and related code.

diffstat:

6 files changed, 2 insertions(+), 27 deletions(-)
src/lib-storage/index/index-storage.c              |    1 -
src/lib-storage/index/index-storage.h              |    3 ---
src/lib-storage/index/index-transaction.c          |    6 ------
src/lib-storage/index/maildir/maildir-sync-index.c |    3 ---
src/lib-storage/index/mbox/mbox-sync-private.h     |    1 -
src/lib-storage/index/mbox/mbox-sync.c             |   15 ++-------------

diffs (96 lines):

diff -r 9f1616eeffb8 -r 1b537cceb640 src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c	Thu Jul 30 19:37:50 2009 -0400
+++ b/src/lib-storage/index/index-storage.c	Thu Jul 30 19:42:41 2009 -0400
@@ -485,7 +485,6 @@ void index_storage_mailbox_alloc(struct 
 		mail_storage_settings_to_index_flags(box->storage->set);
 
 	ibox->next_lock_notify = time(NULL) + LOCK_NOTIFY_INTERVAL;
-	ibox->commit_log_file_seq = 0;
 	ibox->index = index_storage_alloc(box->list, name, flags, index_prefix);
 
 	if (box->file_create_mode == 0) {
diff -r 9f1616eeffb8 -r 1b537cceb640 src/lib-storage/index/index-storage.h
--- a/src/lib-storage/index/index-storage.h	Thu Jul 30 19:37:50 2009 -0400
+++ b/src/lib-storage/index/index-storage.h	Thu Jul 30 19:42:41 2009 -0400
@@ -33,9 +33,6 @@ struct index_mailbox {
 
 	time_t next_lock_notify; /* temporary */
 	enum mailbox_lock_notify_type last_notify_type;
-
-	uint32_t commit_log_file_seq;
-	uoff_t commit_log_file_offset;
 
 	const ARRAY_TYPE(keywords) *keyword_names;
 	struct mail_cache_field *cache_fields;
diff -r 9f1616eeffb8 -r 1b537cceb640 src/lib-storage/index/index-transaction.c
--- a/src/lib-storage/index/index-transaction.c	Thu Jul 30 19:37:50 2009 -0400
+++ b/src/lib-storage/index/index-transaction.c	Thu Jul 30 19:42:41 2009 -0400
@@ -41,12 +41,6 @@ int index_transaction_finish_commit(stru
 	ret = t->super.commit(t->trans, log_file_seq_r, log_file_offset_r);
 	if (ret < 0)
 		mail_storage_set_index_error(t->ibox);
-	else {
-		if (*log_file_seq_r != 0) {
-			t->ibox->commit_log_file_seq = *log_file_seq_r;
-			t->ibox->commit_log_file_offset = *log_file_offset_r;
-		}
-	}
 
 	index_transaction_free(t);
 	return ret;
diff -r 9f1616eeffb8 -r 1b537cceb640 src/lib-storage/index/maildir/maildir-sync-index.c
--- a/src/lib-storage/index/maildir/maildir-sync-index.c	Thu Jul 30 19:37:50 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-sync-index.c	Thu Jul 30 19:42:41 2009 -0400
@@ -311,9 +311,6 @@ static int maildir_sync_index_finish(str
 		if (mail_index_sync_commit(&ctx->sync_ctx) < 0) {
 			mail_storage_set_index_error(&mbox->ibox);
 			ret = -1;
-		} else {
-			mbox->ibox.commit_log_file_seq = 0;
-			mbox->ibox.commit_log_file_offset = 0;
 		}
 		mbox->syncing_commit = FALSE;
 	}
diff -r 9f1616eeffb8 -r 1b537cceb640 src/lib-storage/index/mbox/mbox-sync-private.h
--- a/src/lib-storage/index/mbox/mbox-sync-private.h	Thu Jul 30 19:37:50 2009 -0400
+++ b/src/lib-storage/index/mbox/mbox-sync-private.h	Thu Jul 30 19:42:41 2009 -0400
@@ -7,7 +7,6 @@
 #include <sys/stat.h>
 
 enum mbox_sync_flags {
-	MBOX_SYNC_LAST_COMMIT	= 0x01,
 	MBOX_SYNC_HEADER	= 0x02,
 	MBOX_SYNC_LOCK_READING	= 0x04,
 	MBOX_SYNC_UNDIRTY	= 0x08,
diff -r 9f1616eeffb8 -r 1b537cceb640 src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c	Thu Jul 30 19:37:50 2009 -0400
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Thu Jul 30 19:42:41 2009 -0400
@@ -1775,16 +1775,8 @@ again:
 	if ((flags & MBOX_SYNC_REWRITE) != 0)
 		sync_flags |= MAIL_INDEX_SYNC_FLAG_FLUSH_DIRTY;
 
-	if ((flags & MBOX_SYNC_LAST_COMMIT) != 0) {
-		ret = mail_index_sync_begin_to(mbox->ibox.index,
-				&index_sync_ctx, &sync_view, &trans,
-				mbox->ibox.commit_log_file_seq,
-				mbox->ibox.commit_log_file_offset, sync_flags);
-	} else {
-		ret = mail_index_sync_begin(mbox->ibox.index, &index_sync_ctx,
-					    &sync_view, &trans, sync_flags);
-	}
-
+	ret = mail_index_sync_begin(mbox->ibox.index, &index_sync_ctx,
+				    &sync_view, &trans, sync_flags);
 	if (ret <= 0) {
 		if (ret < 0)
 			mail_storage_set_index_error(&mbox->ibox);
@@ -1882,9 +1874,6 @@ again:
 	else if (mail_index_sync_commit(&index_sync_ctx) < 0) {
 		mail_storage_set_index_error(&mbox->ibox);
 		ret = -1;
-	} else {
-		mbox->ibox.commit_log_file_seq = 0;
-		mbox->ibox.commit_log_file_offset = 0;
 	}
 	sync_ctx.t = NULL;
 	sync_ctx.index_sync_ctx = NULL;


More information about the dovecot-cvs mailing list