Searched defs:sync_ctx (Results 1 - 25 of 31) sorted by relevance

12

/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/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);
/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/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/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-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-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-storage-rebuild.c40 struct mail_index_sync_ctx *sync_ctx; member in struct:rebuild_msg_mailbox
550 struct mail_index_sync_ctx *sync_ctx; local
577 ret = mail_index_sync_begin(box->index, &sync_ctx, &view, &trans,
592 mail_index_sync_set_reason(sync_ctx, "mdbox storage rebuild");
593 if (mail_index_sync_commit(&sync_ctx) < 0) {
652 mail_index_sync_set_reason(msg->sync_ctx, "mdbox storage rebuild");
653 if (mail_index_sync_commit(&msg->sync_ctx) < 0)
748 &ctx->prev_msg.sync_ctx,
/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);
/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/mbox/
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-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-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...]
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,
/dovecot/src/lib-storage/index/imapc/
H A Dimapc-sync.c474 mbox->sync_ctx = ctx;
511 ctx->mbox->sync_ctx = NULL;
524 struct imapc_sync_context *sync_ctx; local
532 if (imapc_sync_begin(mbox, &sync_ctx, force) < 0)
534 if (sync_ctx == NULL)
536 if (imapc_sync_finish(&sync_ctx) < 0)
H A Dimapc-storage.h136 struct imapc_sync_context *sync_ctx; member in struct:imapc_mailbox
/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.h107 struct mailbox_list_index_sync_context *sync_ctx; member in struct:mailbox_list_index
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...]
/dovecot/src/lib-storage/index/maildir/
H A Dmaildir-sync-index.c22 struct mail_index_sync_ctx *sync_ctx; member in struct:maildir_index_sync_context
218 struct mail_index_sync_ctx *sync_ctx; local
228 if (index_storage_expunged_sync_begin(_box, &sync_ctx, &view,
235 ctx->sync_ctx = sync_ctx;
241 index_sync_changes_init(ctx->sync_ctx, ctx->view, ctx->trans,
314 mail_index_sync_no_warning(ctx->sync_ctx);
318 mail_index_sync_rollback(&ctx->sync_ctx);
327 if (mail_index_sync_commit(&ctx->sync_ctx) < 0) {
H A Dmaildir-sync.c1056 struct mail_index_view_sync_ctx *sync_ctx; local
1063 sync_ctx = mail_index_view_sync_begin(mbox->flags_view,
1065 if (mail_index_view_sync_commit(&sync_ctx, &delayed_expunges) < 0) {

Completed in 34 milliseconds

12