Lines Matching defs:file
1 /* Copyright (c) 2009-2018 Dovecot authors, see the included COPYING file */
17 void mail_transaction_log_file_set_corrupted(struct mail_transaction_log_file *file ATTR_UNUSED,
31 struct mail_transaction_log_file *file;
33 for (file = log->files; file != NULL; file = file->next) {
34 if (file->hdr.file_seq == file_seq) {
35 *file_r = file;
43 int mail_transaction_log_file_map(struct mail_transaction_log_file *file ATTR_UNUSED,
51 struct mail_transaction_log_file *file ATTR_UNUSED,
70 struct mail_transaction_log_file **p, *file;
72 file = i_new(struct mail_transaction_log_file, 1);
73 file->hdr.file_seq = file_seq;
74 file->hdr.hdr_size = file->sync_offset = sizeof(file->hdr);
75 file->hdr.prev_file_seq = file_seq - 1;
76 file->hdr.prev_file_offset = (uint32_t)-1;
77 file->log = log;
78 file->fd = -1;
79 file->buffer = buffer_create_dynamic(default_pool, 256);
80 file->buffer_offset = file->hdr.hdr_size;
84 if ((*p)->hdr.file_seq > file->hdr.file_seq) {
85 file->next = *p;
89 *p = file;
90 log->head = file;
110 add_append_record(struct mail_transaction_log_file *file,
120 buffer_append(file->buffer, &hdr, sizeof(hdr));
121 buffer_append(file->buffer, rec, sizeof(*rec));
124 file->sync_offset += size;
149 /* add an append record to the 3rd log file */
210 /* --- first file has been removed --- */