Mercurial > dovecot > core-2.2
changeset 9703:1b537cceb640 HEAD
mbox: Removed unused MBOX_SYNC_LAST_COMMIT and related code.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 30 Jul 2009 19:42:41 -0400 |
parents | 9f1616eeffb8 |
children | f704410ce580 |
files | src/lib-storage/index/index-storage.c src/lib-storage/index/index-storage.h src/lib-storage/index/index-transaction.c src/lib-storage/index/maildir/maildir-sync-index.c src/lib-storage/index/mbox/mbox-sync-private.h src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 6 files changed, 2 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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) {
--- 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 @@ -34,9 +34,6 @@ 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;
--- 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 @@ 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;
--- 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 @@ 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; }
--- 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,
--- 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 @@ 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 @@ 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;