]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox: Removed unused MBOX_SYNC_LAST_COMMIT and related code.
authorTimo Sirainen <tss@iki.fi>
Thu, 30 Jul 2009 23:42:41 +0000 (19:42 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 30 Jul 2009 23:42:41 +0000 (19:42 -0400)
--HG--
branch : HEAD

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

index 39ae0812228a3704f5db0539bd9b2b68624620f1..546918d422fedee653b01693ce0b4c9446b1db3b 100644 (file)
@@ -485,7 +485,6 @@ void index_storage_mailbox_alloc(struct index_mailbox *ibox, const char *name,
                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) {
index 1941f97a88fa8d6710078b2d6d0f65b466dc0661..f075e43daccd9924913e42ac5bd3d616809870f3 100644 (file)
@@ -34,9 +34,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;
 
index 5c0ec0e33292777fd781189e77707ddac0c60b50..45ef9f9e4b96c75aaee2cd935a5cd7f572d876bd 100644 (file)
@@ -41,12 +41,6 @@ int index_transaction_finish_commit(struct index_transaction_context *t,
        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;
index 8ec6741423b28a85e2c4a66ba0b8e1a62a988ff5..d91ada96013ab044816cb26f70ccfbb0d2f91676 100644 (file)
@@ -311,9 +311,6 @@ static int maildir_sync_index_finish(struct maildir_index_sync_context *ctx,
                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;
        }
index ad8dc51656e36b04f9d22fe64b47a5302a4efd4a..2cc13bc45f5368c6967ecca83e5c4a393fd31a6d 100644 (file)
@@ -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,
index c842d89ac7145203d6dab565b52049308b46524b..4988fbc32f0e6227988e25dab84b29d0f33f71e2 100644 (file)
@@ -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;