/dovecot/src/lib-index/ |
H A D | mail-transaction-log.c | 10 #include "mail-transaction-log-private.h" 17 mail_transaction_log_set_head(struct mail_transaction_log *log, argument 20 i_assert(log->head != file); 23 log->head = file; 25 i_assert(log->files != NULL); 26 i_assert(log->files->next != NULL || log->files == file); 32 struct mail_transaction_log *log; local 34 log = i_new(struct mail_transaction_log, 1); 35 log 39 mail_transaction_log_2_unlink_old(struct mail_transaction_log *log) argument 75 mail_transaction_log_open(struct mail_transaction_log *log) argument 108 mail_transaction_log_create(struct mail_transaction_log *log, bool reset) argument 138 mail_transaction_log_close(struct mail_transaction_log *log) argument 152 struct mail_transaction_log *log = *_log; local 163 mail_transaction_log_move_to_memory(struct mail_transaction_log *log) argument 189 mail_transaction_log_indexid_changed(struct mail_transaction_log *log) argument 211 mail_transaction_logs_clean(struct mail_transaction_log *log) argument 234 mail_transaction_log_want_rotate(struct mail_transaction_log *log) argument 261 mail_transaction_log_rotate(struct mail_transaction_log *log, bool reset) argument 320 mail_transaction_log_refresh(struct mail_transaction_log *log, bool nfs_flush, const char **reason_r) argument 378 mail_transaction_log_get_mailbox_sync_pos(struct mail_transaction_log *log, uint32_t *file_seq_r, uoff_t *file_offset_r) argument 386 mail_transaction_log_set_mailbox_sync_pos(struct mail_transaction_log *log, uint32_t file_seq, uoff_t file_offset) argument 397 mail_transaction_log_find_file(struct mail_transaction_log *log, uint32_t file_seq, bool nfs_flush, struct mail_transaction_log_file **file_r, const char **reason_r) argument 477 mail_transaction_log_lock_head(struct mail_transaction_log *log, const char *lock_reason) argument 533 mail_transaction_log_sync_lock(struct mail_transaction_log *log, const char *lock_reason, uint32_t *file_seq_r, uoff_t *file_offset_r) argument 573 mail_transaction_log_sync_unlock(struct mail_transaction_log *log, const char *lock_reason) argument 582 mail_transaction_log_get_head(struct mail_transaction_log *log, uint32_t *file_seq_r, uoff_t *file_offset_r) argument 589 mail_transaction_log_get_tail(struct mail_transaction_log *log, uint32_t *file_seq_r) argument 601 mail_transaction_log_is_head_prev(struct mail_transaction_log *log, uint32_t file_seq, uoff_t file_offset) argument 608 mail_transaction_log_unlink(struct mail_transaction_log *log) argument 619 mail_transaction_log_get_dotlock_set(struct mail_transaction_log *log, struct dotlock_settings *set_r) argument [all...] |
H A D | mailbox-log.c | 6 #include "mailbox-log.h" 13 /* How often to reopen the log file to make sure that the changes are written 34 struct mailbox_log *log; member in struct:mailbox_log_iter 45 static void mailbox_log_close(struct mailbox_log *log); 49 struct mailbox_log *log; local 51 log = i_new(struct mailbox_log, 1); 52 log->filepath = i_strdup(path); 53 log->filepath2 = i_strconcat(path, ".2", NULL); 54 log->mode = 0644; 55 log 62 struct mailbox_log *log = *_log; local 73 mailbox_log_close(struct mailbox_log *log) argument 78 mailbox_log_set_permissions(struct mailbox_log *log, mode_t mode, gid_t gid, const char *gid_origin) argument 87 mailbox_log_open(struct mailbox_log *log) argument 122 mailbox_log_rotate_if_needed(struct mailbox_log *log) argument 153 mailbox_log_append(struct mailbox_log *log, const struct mailbox_log_record *rec) argument 219 mailbox_log_iter_init(struct mailbox_log *log) argument [all...] |
H A D | test-mail-transaction-log-view.c | 7 #include "mail-transaction-log-view-private.h" 9 static struct mail_transaction_log *log; variable in typeref:struct:mail_transaction_log 22 void mail_transaction_logs_clean(struct mail_transaction_log *log ATTR_UNUSED) 26 int mail_transaction_log_find_file(struct mail_transaction_log *log, argument 33 for (file = log->files; file != NULL; file = file->next) { 77 file->log = log; 83 for (p = &log->files; *p != NULL; p = &(*p)->next) { 90 log->head = file; 141 log [all...] |
H A D | mailbox-log.h | 23 void mailbox_log_free(struct mailbox_log **log); 25 void mailbox_log_set_permissions(struct mailbox_log *log, mode_t mode, 32 /* Append a new record to mailbox log. Returns 0 if ok, -1 if error. */ 33 int mailbox_log_append(struct mailbox_log *log, 36 /* Iterate through all records in mailbox log. */ 37 struct mailbox_log_iter *mailbox_log_iter_init(struct mailbox_log *log);
|
H A D | test-mail-transaction-log-append.c | 7 #include "mail-transaction-log-private.h" 19 int mail_transaction_log_lock_head(struct mail_transaction_log *log ATTR_UNUSED, 42 static void test_append_expunge(struct mail_transaction_log *log) argument 45 struct mail_transaction_log_file *file = log->head; 51 test_assert(mail_transaction_log_append_begin(log->index, MAIL_TRANSACTION_EXTERNAL, &ctx) == 0); 92 static void test_append_sync_offset(struct mail_transaction_log *log) argument 94 struct mail_transaction_log_file *file = log->head; 100 test_begin("transaction log append: append_sync_offset only"); 101 test_assert(mail_transaction_log_append_begin(log->index, 0, &ctx) == 0); 121 struct mail_transaction_log *log; local [all...] |
H A D | mail-transaction-log-private.h | 5 #include "mail-transaction-log.h" 24 struct mail_transaction_log *log; member in struct:mail_transaction_log_file 53 log. max_tail_offset is what should be written to the log the next 54 time a transaction is written. transaction log handling may update 82 /* files is a linked list of all the opened log files. the list is 83 sorted by the log file sequence, so that transaction views can use 84 them easily. head contains a pointer to the newest log file. */ 86 /* open_file is used temporarily while opening the log file. 102 void mail_transaction_log_get_dotlock_set(struct mail_transaction_log *log, [all...] |
H A D | mail-transaction-log-append.c | 7 #include "mail-transaction-log-private.h" 35 MAIL_TRANSACTION_LOG_HDR_VERSION(&ctx->log->head->hdr)); 42 struct mail_transaction_log_file *file = ctx->log->head; 44 /* first we need to truncate this latest write so that log syncing 47 mail_index_file_set_syscall_error(ctx->log->index, 52 if (mail_index_move_to_memory(ctx->log->index) < 0) 64 struct mail_transaction_log_file *file = ctx->log->head; 81 mail_index_file_set_syscall_error(ctx->log->index, 92 file->log->index->fsync_mode != FSYNC_MODE_NEVER) || 93 file->log [all...] |
H A D | mail-transaction-log.h | 6 #define MAIL_TRANSACTION_LOG_SUFFIX ".log" 34 uint64_t initial_modseq; /* v1.1+ (note: log's major/minor version) */ 68 /* since we'll expunge mails based on data read from transaction log, 69 try to avoid the possibility of corrupted transaction log expunging 71 flag. if it's not present, assume corrupted log. */ 183 struct mail_transaction_log *log; member in struct:mail_transaction_log_append_ctx 204 void mail_transaction_log_free(struct mail_transaction_log **log); 206 /* Open the transaction log. Returns 1 if ok, 0 if file doesn't exist or it's 208 int mail_transaction_log_open(struct mail_transaction_log *log); 209 /* Create, or recreate, the transaction log [all...] |
H A D | mail-transaction-log-file.c | 13 #include "mail-transaction-log-private.h" 16 #define MEMORY_LOG_NAME "(in-memory transaction log file)" 27 mail_index_file_set_syscall_error(file->log->index, 39 file->log->index->readonly) 42 /* indexid=0 marks the log file as corrupted. we opened the file with 47 mail_index_file_set_syscall_error(file->log->index, 52 mail_index_file_set_syscall_error(file->log->index, 58 mail_index_file_set_syscall_error(file->log->index, 75 mail_index_set_error(file->log->index, 76 "Corrupted transaction log fil 85 mail_transaction_log_file_alloc(struct mail_transaction_log *log, const char *path) argument 138 struct mail_transaction_log *log = file->log; local 219 mail_transaction_log_init_hdr(struct mail_transaction_log *log, struct mail_transaction_log_header *hdr) argument 287 mail_transaction_log_file_alloc_in_memory(struct mail_transaction_log *log) argument [all...] |
H A D | mail-transaction-log-view-private.h | 4 #include "mail-transaction-log-private.h" 7 struct mail_transaction_log *log; member in struct:mail_transaction_log_view 15 /* a list of log files we've referenced. we have to keep this list
|
H A D | test-mail-index-modseq.c | 9 #include "mail-transaction-log-private.h" 58 test_assert(mail_transaction_log_file_lock(index->log->head) == 0); 59 test_assert(mail_transaction_log_rotate(index->log, FALSE) == 0); 60 mail_transaction_log_file_unlock(index->log->head, "rotating");
|
H A D | mail-transaction-log-view.c | 7 #include "mail-transaction-log-view-private.h" 10 mail_transaction_log_view_open(struct mail_transaction_log *log) argument 15 view->log = log; 18 i_assert(view->log->head != NULL); 20 view->head = view->tail = view->log->head; 25 view->next = log->views; 26 log->views = view; 50 for (p = &view->log->views; *p != NULL; p = &(*p)->next) { 58 mail_transaction_logs_clean(view->log); 65 mail_transaction_log_get_file_seqs(struct mail_transaction_log *log) argument [all...] |
H A D | mail-index-transaction.c | 10 #include "mail-transaction-log-private.h" 152 rotating the log. We don't care if we skip some non-synced 154 if (mail_transaction_log_rotate(t->view->index->log, TRUE) < 0) 162 file = t->view->index->log->head; 178 struct mail_transaction_log *log = t->view->index->log; local 192 if (mail_transaction_log_append_begin(log->index, trans_flags, &ctx) < 0) 204 mail_transaction_log_get_head(log, &log_seq1, &log_offset1); 207 mail_transaction_log_get_head(log, &log_seq2, &log_offset2); 211 i_assert(expected_highest_modseq == log [all...] |
H A D | mail-index.c | 19 #include "mail-transaction-log-private.h" 20 #include "mail-transaction-log-view-private.h" 41 .log = { 89 index->log = mail_transaction_log_alloc(index); 102 mail_transaction_log_free(&index->log); 199 /* log */ 200 if (set->log.min_size != 0) 201 dest->log.min_size = set->log.min_size; 202 if (set->log [all...] |
H A D | mail-index-modseq.c | 5 #include "mail-transaction-log-private.h" 49 return index->log->head == NULL ? 1 : 50 I_MAX(index->log->head->sync_highest_modseq, 1); 118 /* fallback to returning the log head. if modseqs aren't 120 return map->index->log->head == NULL ? 0 : 121 map->index->log->head->sync_highest_modseq; 425 ctx->log_view = mail_transaction_log_view_open(ctx->view->index->log); 681 struct mail_transaction_log *log = view->index->log; local 686 if (log [all...] |
H A D | mail-index-write.c | 8 #include "mail-transaction-log-private.h" 129 /* rotate the .log before writing index, so the index will point to 130 the latest log. */ 132 hdr->log_file_seq == index->log->head->hdr.file_seq && 134 if (mail_transaction_log_rotate(index->log, FALSE) == 0) { 136 index->log->head; 142 /* Assume .log.2 was created successfully. If it
|
H A D | mail-index-fsck.c | 7 #include "mail-transaction-log-private.h" 35 mail_transaction_log_get_head(index->log, &file_seq, &file_offset); 37 /* index's log_file_seq is too old. move it to log head. */ 41 /* index's log_file_seq matches the current log. make sure the 54 end of the current log head. */ 77 if (index->log->head != NULL) 346 /* log an error once, and skip this record */ 423 if (index->log->head != NULL) { 424 /* Remember the log head position. If we go back in the index's 425 head offset, ignore errors in the log u [all...] |
H A D | mail-index-sync.c | 8 #include "mail-transaction-log-private.h" 184 /* read all transactions from log into a transaction in memory. 262 /* we want to sync up to transaction log's head */ 263 mail_transaction_log_get_head(index->log, 288 mail_transaction_log_get_head(view->index->log, &log_seq, &log_offset); 299 "Unexpected transaction log desync with index %s: %s", 332 /* if we require changes, don't lock transaction log yet. first check 335 if (mail_transaction_log_sync_lock(index->log, "syncing", 346 transaction log except for expunges. They're synced in 351 mail_transaction_log_sync_unlock(index->log, "syn [all...] |
/dovecot/src/log/ |
H A D | log-connection.c | 13 #include "log-error-buffer.h" 14 #include "log-connection.h" 23 log connection. */ 25 /* If we keep being busy, log a warning every 60 seconds. */ 58 log_connection_destroy(struct log_connection *log, bool shutting_down); 86 static struct log_client *log_client_get(struct log_connection *log, pid_t pid) argument 90 client = hash_table_lookup(log->clients, POINTER_CAST(pid)); 93 hash_table_insert(log->clients, POINTER_CAST(pid), client); 98 static void log_client_free(struct log_connection *log, argument 101 hash_table_remove(log 107 log_parse_option(struct log_connection *log, const struct failure_line *failure) argument 122 client_log_ctx(struct log_connection *log, const struct failure_context *ctx, const struct timeval *log_time, const char *prefix, const char *text) argument 154 client_log_fatal(struct log_connection *log, struct log_client *client, const char *line, const struct timeval *log_time, const struct tm *tm) argument 182 struct log_connection *const *logs, *log; local 236 log_it(struct log_connection *log, const char *line, const struct timeval *log_time, const struct tm *tm) argument 283 log_connection_handshake(struct log_connection *log) argument 334 log_connection_input(struct log_connection *log) argument 401 struct log_connection *log; local 418 log_connection_destroy(struct log_connection *log, bool shutting_down) argument [all...] |
/dovecot/src/plugins/fts/ |
H A D | fts-expunge-log.c | 11 #include "fts-expunge-log.h" 28 /* Total number of messages expunged so far in this log */ 46 struct fts_expunge_log *log; member in struct:fts_expunge_log_append_ctx 56 struct fts_expunge_log *log; member in struct:fts_expunge_log_read_ctx 69 struct fts_expunge_log *log; local 71 log = i_new(struct fts_expunge_log, 1); 72 log->path = i_strdup(path); 73 log->fd = -1; 74 return log; 79 struct fts_expunge_log *log local 87 fts_expunge_log_open(struct fts_expunge_log *log, bool create) argument 112 fts_expunge_log_reopen_if_needed(struct fts_expunge_log *log, bool create) argument 139 fts_expunge_log_read_expunge_count(struct fts_expunge_log *log, uint32_t *expunge_count_r) argument 173 fts_expunge_log_append_begin(struct fts_expunge_log *log) argument 302 struct fts_expunge_log *log = ctx->log; local 370 fts_expunge_log_uid_count(struct fts_expunge_log *log, unsigned int *expunges_r) argument 394 fts_expunge_log_read_begin(struct fts_expunge_log *log) argument [all...] |
H A D | fts-expunge-log.h | 13 void fts_expunge_log_deinit(struct fts_expunge_log **log); 16 fts_expunge_log_append_begin(struct fts_expunge_log *log); 34 int fts_expunge_log_uid_count(struct fts_expunge_log *log, 38 fts_expunge_log_read_begin(struct fts_expunge_log *log); 42 If end() is called before reading all records, the log isn't unlinked. */ 45 /* Read an entire log file, and flatten it into one hash of arrays. 51 /* Modify in-place a flattened log. If non-existent mailbox GUIDs are 55 /* Write a modified flattened log as a new file. */
|
/dovecot/src/director/ |
H A D | director-test.sh | 25 log_path = /var/log/dovecot.log 26 info_log_path = /var/log/dovecot-info.log 63 log_path = /var/log/dovecot.log 64 info_log_path = /var/log/dovecot-access.log
|
/dovecot/src/plugins/fts-lucene/ |
H A D | lucene-wrapper.h | 41 struct fts_expunge_log *log);
|
/dovecot/src/lib-storage/ |
H A D | test-mailbox-get.c | 39 mail_transaction_log_view_open(struct mail_transaction_log *log ATTR_UNUSED) { return NULL; } 51 void mail_transaction_log_get_tail(struct mail_transaction_log *log ATTR_UNUSED,
|
/dovecot/src/doveadm/dsync/ |
H A D | dsync-mailbox-tree-fill.c | 9 #include "mailbox-log.h" 150 struct mailbox_log *log; local 156 log = mailbox_list_get_changelog(ns->list); 157 if (log == NULL) 160 iter = mailbox_log_iter_init(log); 228 i_error("Mailbox log iteration for namespace '%s' failed",
|