Searched refs:sync_ctx (Results 1 - 25 of 36) sorted by relevance

12

/dovecot/src/lib-storage/index/mbox/
H A Dmbox-sync.c67 void mbox_sync_set_critical(struct mbox_sync_context *sync_ctx, argument
72 sync_ctx->errors = TRUE;
73 if (sync_ctx->ext_modified) {
74 mailbox_set_critical(&sync_ctx->mbox->box,
80 mailbox_set_critical(&sync_ctx->mbox->box,
86 int mbox_sync_seek(struct mbox_sync_context *sync_ctx, uoff_t from_offset) argument
88 if (istream_raw_mbox_seek(sync_ctx->input, from_offset) < 0) {
89 mbox_sync_set_critical(sync_ctx,
97 void mbox_sync_file_update_ext_modified(struct mbox_sync_context *sync_ctx) argument
103 if (fstat(sync_ctx
116 mbox_sync_file_updated(struct mbox_sync_context *sync_ctx, bool dirty) argument
129 mbox_sync_read_next_mail(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx) argument
181 mbox_sync_read_index_syncs(struct mbox_sync_context *sync_ctx, uint32_t uid, bool *sync_expunge_r) argument
200 mbox_sync_read_index_rec(struct mbox_sync_context *sync_ctx, uint32_t uid, const struct mail_index_record **rec_r) argument
248 mbox_sync_find_index_md5(struct mbox_sync_context *sync_ctx, unsigned char hdr_md5_sum[], const struct mail_index_record **rec_r) argument
282 mbox_sync_update_from_offset(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail *mail, bool nocheck) argument
307 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
323 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
339 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
377 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
417 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
515 mbox_rewrite_base_uid_last(struct mbox_sync_context *sync_ctx) argument
582 update_from_offsets(struct mbox_sync_context *sync_ctx) argument
605 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
640 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
741 struct mbox_sync_context *sync_ctx = mail_ctx->sync_ctx; local
826 mbox_sync_seek_to_seq(struct mbox_sync_context *sync_ctx, uint32_t seq) argument
892 mbox_sync_seek_to_uid(struct mbox_sync_context *sync_ctx, uint32_t uid) argument
926 mbox_sync_partial_seek_next(struct mbox_sync_context *sync_ctx, uint32_t next_uid, bool *partial, bool *skipped_mails) argument
989 mbox_sync_hdr_update(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx) argument
1009 mbox_sync_imapbase(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx) argument
1027 mbox_sync_loop(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx, bool partial) argument
1222 mbox_write_pseudo(struct mbox_sync_context *sync_ctx, bool force) argument
1284 mbox_append_zero(struct mbox_sync_context *sync_ctx, uoff_t orig_file_size, uoff_t count) argument
1310 mbox_sync_handle_eof_updates(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx) argument
1467 mbox_sync_update_index_header(struct mbox_sync_context *sync_ctx) argument
1563 mbox_sync_restart(struct mbox_sync_context *sync_ctx) argument
1597 mbox_sync_do(struct mbox_sync_context *sync_ctx, enum mbox_sync_flags flags) argument
1782 mbox_sync_context_free(struct mbox_sync_context *sync_ctx) argument
1801 struct mbox_sync_context sync_ctx; local
[all...]
H A Dmbox-sync-rewrite.c15 int mbox_move(struct mbox_sync_context *sync_ctx, argument
18 struct mbox_mailbox *mbox = sync_ctx->mbox;
29 i_stream_sync(sync_ctx->input);
31 output = o_stream_create_fd_file(sync_ctx->write_fd, (uoff_t)-1, FALSE);
32 i_stream_seek(sync_ctx->file_input, source);
34 mbox_set_syscall_error(sync_ctx->mbox,
42 input = i_stream_create_limit(sync_ctx->file_input, size);
55 mbox_sync_set_critical(sync_ctx,
65 mbox_sync_file_updated(sync_ctx, FALSE);
70 static int mbox_fill_space(struct mbox_sync_context *sync_ctx, argument
253 struct mbox_sync_context *sync_ctx = ctx->sync_ctx; local
329 mbox_sync_read_next(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx, struct mbox_sync_mail *mails, uint32_t seq, uint32_t idx, uoff_t expunged_space) argument
400 mbox_sync_read_and_move(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx, struct mbox_sync_mail *mails, uint32_t seq, uint32_t idx, uint32_t padding, off_t move_diff, uoff_t expunged_space, uoff_t end_offset, bool first_nonexpunged) argument
495 mbox_sync_rewrite(struct mbox_sync_context *sync_ctx, struct mbox_sync_mail_context *mail_ctx, uoff_t end_offset, off_t move_diff, uoff_t extra_space, uint32_t first_seq, uint32_t last_seq) argument
[all...]
H A Dmbox-sync-parse.c123 struct mailbox *box = &ctx->sync_ctx->mbox->box;
146 if (mailbox_keyword_is_valid(&ctx->sync_ctx->mbox->box,
168 ctx->sync_ctx->renumber_uids) {
212 ctx->sync_ctx->base_uid_last_offset =
216 if (ctx->sync_ctx->base_uid_validity == 0) {
219 ctx->sync_ctx->base_uid_validity = uid_validity;
220 ctx->sync_ctx->base_uid_last = uid_last;
222 if (ctx->sync_ctx->next_uid-1 <= uid_last) {
225 ctx->sync_ctx->next_uid = uid_last+1;
230 i_assert(ctx->sync_ctx
458 struct mbox_sync_context *sync_ctx = ctx->sync_ctx; local
[all...]
H A Dmbox-sync-private.h75 struct mbox_sync_context *sync_ctx; member in struct:mbox_sync_mail_context
156 void mbox_sync_set_critical(struct mbox_sync_context *sync_ctx,
168 int mbox_sync_rewrite(struct mbox_sync_context *sync_ctx,
173 int mbox_sync_seek(struct mbox_sync_context *sync_ctx, uoff_t from_offset);
174 void mbox_sync_file_update_ext_modified(struct mbox_sync_context *sync_ctx);
175 void mbox_sync_file_updated(struct mbox_sync_context *sync_ctx, bool dirty);
176 int mbox_move(struct mbox_sync_context *sync_ctx,
H A Dmbox-sync-update.c124 keywords_append(struct mbox_sync_context *sync_ctx, string_t *dest, argument
128 INDEX_STORAGE_CONTEXT(&sync_ctx->mbox->box);
158 INDEX_STORAGE_CONTEXT(&ctx->sync_ctx->mbox->box);
199 if (ctx->sync_ctx->dest_first_mail &&
201 i_assert(ctx->sync_ctx->base_uid_validity != 0);
209 ctx->sync_ctx->base_uid_validity);
211 ctx->last_uid_updated_value = ctx->sync_ctx->next_uid-1;
252 keywords_append(ctx->sync_ctx, ctx->header,
333 keywords_append(ctx->sync_ctx, str, &ctx->mail.keywords);
340 struct mbox_sync_context *sync_ctx local
[all...]
/dovecot/src/lib-storage/list/
H A Dmailbox-list-index-sync.c206 sync_expunge_nonexistent(struct mailbox_list_index_sync_context *sync_ctx, argument
213 sync_expunge_nonexistent(sync_ctx, node->children);
216 if (mail_index_lookup_seq(sync_ctx->view, node->uid,
218 mail_index_expunge(sync_ctx->trans, seq);
219 mailbox_list_index_node_unlink(sync_ctx->ilist, node);
229 struct mailbox_list_index_sync_context *sync_ctx; local
263 sync_ctx = i_new(struct mailbox_list_index_sync_context, 1);
264 sync_ctx->list = list;
265 sync_ctx->ilist = ilist;
266 sync_ctx
291 mailbox_list_index_sync_list(struct mailbox_list_index_sync_context *sync_ctx) argument
349 mailbox_list_index_sync_update_hdr(struct mailbox_list_index_sync_context *sync_ctx) argument
371 mailbox_list_index_sync_update_corrupted_node(struct mailbox_list_index_sync_context *sync_ctx, struct mailbox_list_index_node *node) argument
407 mailbox_list_index_sync_update_corrupted_nodes(struct mailbox_list_index_sync_context *sync_ctx, struct mailbox_list_index_node *node) argument
417 mailbox_list_index_sync_update_corrupted(struct mailbox_list_index_sync_context *sync_ctx) argument
429 struct mailbox_list_index_sync_context *sync_ctx = *_sync_ctx; local
457 struct mailbox_list_index_sync_context *sync_ctx; local
476 mailbox_list_index_sync_delete(struct mailbox_list_index_sync_context *sync_ctx, const char *name, bool delete_selectable) argument
[all...]
H A Dmailbox-list-index-backend.c150 if (ilist->sync_ctx != NULL) {
153 view = ilist->sync_ctx->view;
188 if (ilist->sync_ctx == NULL)
249 struct mailbox_list_index_sync_context *sync_ctx; local
255 if (mailbox_list_index_sync_begin(&list->list, &sync_ctx) < 0)
258 seq = mailbox_list_index_sync_name(sync_ctx, name, &node, &created);
262 mail_index_update_flags(sync_ctx->trans, seq, MODIFY_REPLACE,
269 if (mailbox_list_index_sync_end(&sync_ctx, TRUE) < 0)
281 struct mailbox_list_index_sync_context *sync_ctx; local
288 if (mailbox_list_index_sync_begin(&list->list, &sync_ctx) <
655 struct mailbox_list_index_sync_context *sync_ctx; local
738 struct mailbox_list_index_sync_context *sync_ctx; local
[all...]
H A Dmailbox-list-index-sync.h32 int mailbox_list_index_sync_delete(struct mailbox_list_index_sync_context *sync_ctx,
/dovecot/src/lib-index/
H A Dmail-cache-sync-update.c37 static void mail_cache_handler_deinit(struct mail_index_sync_map_ctx *sync_ctx, argument
40 struct mail_cache *cache = sync_ctx->view->index->cache;
50 int mail_cache_expunge_handler(struct mail_index_sync_map_ctx *sync_ctx, argument
58 mail_cache_handler_deinit(sync_ctx, ctx);
/dovecot/src/imap/
H A Dcmd-idle.c16 struct imap_sync_context *sync_ctx; member in struct:cmd_idle_context
34 if (ctx->sync_ctx != NULL) {
36 (void)imap_sync_deinit(ctx->sync_ctx, ctx->cmd);
90 if (ctx->sync_ctx != NULL) {
138 i_assert(ctx->sync_ctx == NULL);
145 ctx->sync_ctx = imap_sync_init(ctx->client, box, 0, 0);
153 if (ctx->sync_ctx != NULL)
183 i_assert(ctx->sync_ctx == NULL);
227 if (ctx->sync_ctx != NULL) {
228 if (imap_sync_more(ctx->sync_ctx)
[all...]
H A Dimap-sync-private.h21 struct mailbox_sync_context *sync_ctx; member in struct:imap_sync_context
/dovecot/src/lib-storage/index/cydir/
H A Dcydir-sync.c153 struct cydir_sync_context *sync_ctx; local
155 if (cydir_sync_begin(mbox, &sync_ctx, FALSE) < 0)
158 return sync_ctx == NULL ? 0 :
159 cydir_sync_finish(&sync_ctx, TRUE);
H A Dcydir-save.c26 struct cydir_sync_context *sync_ctx; member in struct:cydir_save_context
237 if (cydir_sync_begin(ctx->mbox, &ctx->sync_ctx, TRUE) < 0) {
243 hdr = mail_index_get_header(ctx->sync_ctx->sync_view);
246 _t->changes->uid_validity = ctx->sync_ctx->uid_validity;
285 mail_index_sync_set_commit_result(ctx->sync_ctx->index_sync_ctx,
288 (void)cydir_sync_finish(&ctx->sync_ctx, TRUE);
299 if (ctx->sync_ctx != NULL)
300 (void)cydir_sync_finish(&ctx->sync_ctx, FALSE);
/dovecot/src/lib-storage/index/dbox-multi/
H A Dmdbox-map-private.h51 struct mail_index_sync_ctx *sync_ctx; member in struct:mdbox_map_atomic_context
H A Dmdbox-save.c34 struct mdbox_sync_context *sync_ctx; member in struct:mdbox_save_context
304 &ctx->sync_ctx) < 0) {
320 dbox_save_update_header_flags(&ctx->ctx, ctx->sync_ctx->sync_view,
324 hdr = mail_index_get_header(ctx->sync_ctx->sync_view);
357 mail_index_sync_set_reason(ctx->sync_ctx->index_sync_ctx, "copying");
359 mail_index_sync_set_reason(ctx->sync_ctx->index_sync_ctx, "saving");
374 mail_index_sync_set_commit_result(ctx->sync_ctx->index_sync_ctx,
378 if (mdbox_sync_finish(&ctx->sync_ctx, TRUE) == 0) {
419 if (ctx->sync_ctx != NULL)
420 (void)mdbox_sync_finish(&ctx->sync_ctx, FALS
[all...]
H A Dmdbox-sync.c335 struct mdbox_sync_context *sync_ctx; local
340 ret = mdbox_sync_begin(mbox, flags, atomic, &sync_ctx);
341 if (ret == 0 && sync_ctx != NULL)
342 ret = mdbox_sync_finish(&sync_ctx, TRUE);
H A Dmdbox-map.c481 struct mail_index_sync_ctx *sync_ctx)
487 mail_index_sync_get_offsets(sync_ctx, &seq1, &offset1, &seq2, &offset2);
495 while (mail_index_sync_next(sync_ctx, &sync_rec)) ;
511 ret = mail_index_sync_begin(atomic->map->index, &atomic->sync_ctx,
522 mail_index_sync_set_reason(atomic->sync_ctx, reason);
527 mdbox_map_sync_handle(atomic->map, atomic->sync_ctx);
560 if (atomic->sync_ctx == NULL) {
564 if (mail_index_sync_commit(&atomic->sync_ctx) < 0) {
570 mail_index_sync_rollback(&atomic->sync_ctx);
1463 struct mail_index_sync_ctx *sync_ctx; local
480 mdbox_map_sync_handle(struct mdbox_map *map, struct mail_index_sync_ctx *sync_ctx) argument
[all...]
/dovecot/src/lib-storage/index/
H A Dindex-sync-private.h11 struct mail_index_view_sync_ctx *sync_ctx; member in struct:index_mailbox_sync_context
H A Dindex-sync-pvt.c10 struct mail_index_sync_ctx *sync_ctx; member in struct:index_mailbox_sync_pvt_context
114 if (mail_index_sync_begin(ctx->box->index_pvt, &ctx->sync_ctx,
162 if (ctx->sync_ctx == NULL) {
243 if ((ret = mail_index_sync_commit(&ctx->sync_ctx)) < 0)
333 if (ctx->sync_ctx != NULL)
334 mail_index_sync_rollback(&ctx->sync_ctx);
H A Dindex-sync.c63 while (mail_index_view_sync_next(ctx->sync_ctx, &sync_rec)) {
134 ctx->sync_ctx = mail_index_view_sync_begin(box->view, sync_flags);
136 mail_index_view_sync_get_expunges(ctx->sync_ctx,
331 if (ctx->sync_ctx != NULL) {
332 if (mail_index_view_sync_commit(&ctx->sync_ctx,
/dovecot/src/lib-storage/index/dbox-single/
H A Dsdbox-save.c27 struct sdbox_sync_context *sync_ctx; member in struct:sdbox_save_context
313 SDBOX_SYNC_FLAG_FSYNC, &ctx->sync_ctx) < 0) {
319 dbox_save_update_header_flags(&ctx->ctx, ctx->sync_ctx->sync_view,
322 hdr = mail_index_get_header(ctx->sync_ctx->sync_view);
357 mail_index_sync_set_commit_result(ctx->sync_ctx->index_sync_ctx,
360 if (sdbox_sync_finish(&ctx->sync_ctx, TRUE) < 0)
382 if (ctx->sync_ctx != NULL)
383 (void)sdbox_sync_finish(&ctx->sync_ctx, FALSE);
H A Dsdbox-sync.c296 struct sdbox_sync_context *sync_ctx; local
298 if (sdbox_sync_begin(mbox, flags, &sync_ctx) < 0)
301 if (sync_ctx == NULL)
303 return sdbox_sync_finish(&sync_ctx, TRUE);
/dovecot/src/lib-storage/index/maildir/
H A Dmaildir-sync.h34 int maildir_sync_index(struct maildir_index_sync_context *sync_ctx,
H A Dmaildir-save.c51 struct maildir_index_sync_context *sync_ctx; member in struct:maildir_save_context
740 if (maildir_sync_index_begin(mbox, NULL, &ctx->sync_ctx) < 0)
743 maildir_sync_get_keywords_sync_ctx(ctx->sync_ctx);
749 if (maildir_sync_index(ctx->sync_ctx, TRUE) < 0)
902 i_assert(ctx->sync_ctx != NULL);
903 maildir_sync_set_new_msgs_count(ctx->sync_ctx,
1024 maildir_sync_index_rollback(&ctx->sync_ctx);
1026 (void)maildir_sync_index_commit(&ctx->sync_ctx);
1076 if (ctx->sync_ctx != NULL)
1077 maildir_sync_index_rollback(&ctx->sync_ctx);
[all...]
/dovecot/src/lib-storage/index/dbox-common/
H A Ddbox-storage.c358 struct mail_index_sync_ctx *sync_ctx; local
364 ret = mail_index_sync_begin(box->index, &sync_ctx, &view, &trans, 0);
373 mail_index_sync_rollback(&sync_ctx);
378 return mail_index_sync_commit(&sync_ctx);

Completed in 34 milliseconds

12