i_warning("fscking index file %s", index->filepath);
+ index->fscked = TRUE;
+
if (index->log->head == NULL) {
/* we're trying to open the index files, but there wasn't
any .log file. */
ret = mail_index_fsck(index);
i_assert(ret == 0);
}
+
+bool mail_index_reset_fscked(struct mail_index *index)
+{
+ bool ret = index->fscked;
+
+ index->fscked = FALSE;
+ return ret;
+}
unsigned int modseqs_enabled:1;
unsigned int initial_create:1;
unsigned int initial_mapped:1;
+ unsigned int fscked:1;
};
extern struct mail_index_module_register mail_index_module_register;
/* Check and fix any found problems. Returns -1 if we couldn't lock for sync,
0 if everything went ok. */
int mail_index_fsck(struct mail_index *index);
+/* Returns TRUE if mail_index_fsck() has been called since the last
+ mail_index_reset_fscked() call. */
+bool mail_index_reset_fscked(struct mail_index *index);
/* Synchronize changes in view. You have to go through all records, or view
will be marked inconsistent. Only sync_mask type records are