Searched refs:map (Results 1 - 25 of 63) sorted by relevance

123

/dovecot/src/lib-index/
H A Dmail-index-map.c10 void mail_index_map_init_extbufs(struct mail_index_map *map, argument
15 ((sizeof(map->extensions) + sizeof(buffer_t)) * 2)
21 if (map->extension_pool == NULL) {
24 map->extension_pool =
25 pool_alloconly_create(MEMPOOL_GROWING"map extensions",
28 p_clear(map->extension_pool);
32 size = p_get_max_easy_alloc_size(map->extension_pool);
39 p_array_init(&map->extensions, map->extension_pool, initial_count);
40 p_array_init(&map
43 mail_index_map_lookup_ext(struct mail_index_map *map, const char *name, uint32_t *idx_r) argument
67 mail_index_map_register_ext(struct mail_index_map *map, const char *name, uint32_t ext_offset, const struct mail_index_ext_header *ext_hdr) argument
106 mail_index_map_ext_get_next(struct mail_index_map *map, unsigned int *offset_p, const struct mail_index_ext_header **ext_hdr_r, const char **name_r) argument
266 mail_index_record_map_free(struct mail_index_map *map, struct mail_index_record_map *rec_map) argument
284 mail_index_record_map_unlink(struct mail_index_map *map) argument
306 struct mail_index_map *map = *_map; local
368 mail_index_record_map_alloc(struct mail_index_map *map) argument
378 mail_index_map_clone(const struct mail_index_map *map) argument
426 mail_index_record_map_move_to_private(struct mail_index_map *map) argument
456 mail_index_map_move_to_memory(struct mail_index_map *map) argument
485 mail_index_map_get_ext_idx(struct mail_index_map *map, uint32_t ext_id, uint32_t *idx_r) argument
499 mail_index_bsearch_uid(struct mail_index_map *map, uint32_t uid, uint32_t left_idx, int nearest_side) argument
543 mail_index_map_lookup_seq_range(struct mail_index_map *map, uint32_t first_uid, uint32_t last_uid, uint32_t *first_seq_r, uint32_t *last_seq_r) argument
[all...]
H A Dmail-index-map-hdr.c7 int mail_index_map_parse_extensions(struct mail_index_map *map) argument
9 struct mail_index *index = map->index;
17 offset = MAIL_INDEX_HEADER_SIZE_ALIGN(map->hdr.base_header_size);
18 if (offset >= map->hdr.header_size && map->extension_pool == NULL) {
24 mail_index_map_init_extbufs(map, old_count + 5);
28 array_append(&map->ext_id_map, &ext_id, 1);
30 for (i = 0; offset < map->hdr.header_size; i++) {
33 if (mail_index_map_ext_get_next(map, &offset,
41 if (mail_index_map_ext_hdr_check(&map
60 mail_index_map_parse_keywords(struct mail_index_map *map) argument
223 mail_index_map_clear_recent_flags(struct mail_index_map *map) argument
234 mail_index_map_check_header(struct mail_index_map *map, const char **error_r) argument
[all...]
H A Dtest-mail-index-map.c13 struct mail_index_map map; local
16 i_zero(&map);
18 map.rec_map = &rec_map;
19 map.hdr.messages_count = messages_count;
20 map.hdr.record_size = sizeof(struct mail_index_record);
21 rec_map.records_count = map.hdr.messages_count;
22 rec_map.records = i_new(struct mail_index_record, map.hdr.messages_count);
24 for (seq = 1; seq <= map.hdr.messages_count; seq++)
25 MAIL_INDEX_REC_AT_SEQ(&map, seq)->uid = seq*2;
27 map
[all...]
H A Dmail-index-sync-update.c19 struct mail_index_map *map, bool eol)
45 map->hdr.log_file_seq = prev_seq;
48 if (map->hdr.log_file_seq != prev_seq) {
49 map->hdr.log_file_seq = prev_seq;
50 map->hdr.log_file_tail_offset = 0;
53 map->hdr.log_file_head_offset = prev_offset;
57 struct mail_index_map *map)
61 i_assert(view->map != map);
63 mail_index_sync_update_log_offset(ctx, view->map, FALS
18 mail_index_sync_update_log_offset(struct mail_index_sync_map_ctx *ctx, struct mail_index_map *map, bool eol) argument
56 mail_index_sync_replace_map(struct mail_index_sync_map_ctx *ctx, struct mail_index_map *map) argument
76 struct mail_index_map *map = ctx->view->map; local
241 struct mail_index_map *map; local
301 sync_append_record(struct mail_index_map *map) argument
378 struct mail_index_map *map = view->map; local
483 struct mail_index_map *map = ctx->view->map; local
848 mail_index_sync_update_hdr_dirty_flag(struct mail_index_map *map) argument
868 mail_index_map_check(struct mail_index_map *map) argument
900 struct mail_index_map *map = *_map; local
[all...]
H A Dmail-index-view.c14 struct mail_index_map *map; local
19 map = mail_index_map_clone(view->map);
20 mail_index_unmap(&view->map);
21 view->map = map;
39 dest->map = src->map;
40 if (dest->map != NULL)
41 dest->map
112 mail_index_view_ref_map(struct mail_index_view *view, struct mail_index_map *map) argument
167 struct mail_index_map *map; local
292 mail_index_data_lookup_keywords(struct mail_index_map *map, const unsigned char *data, ARRAY_TYPE(keyword_indexes) *keyword_idx) argument
340 struct mail_index_map *map; local
349 view_map_lookup_ext_full(struct mail_index_map *map, const struct mail_index_record *rec, uint32_t ext_id) argument
374 view_get_header_ext(struct mail_index_view *view, struct mail_index_map *map, uint32_t ext_id, const void **data_r, size_t *data_size_r) argument
398 view_ext_get_reset_id(struct mail_index_view *view ATTR_UNUSED, struct mail_index_map *map, uint32_t ext_id, uint32_t *reset_id_r) argument
440 struct mail_index_map *map; local
454 struct mail_index_map *map; local
461 mail_index_map_lookup_keywords(struct mail_index_map *map, uint32_t seq, ARRAY_TYPE(keyword_indexes) *keyword_idx) argument
536 struct mail_index_map *map; local
554 mail_index_map_get_header_ext(struct mail_index_view *view, struct mail_index_map *map, uint32_t ext_id, const void **data_r, size_t *data_size_r) argument
561 mail_index_ext_get_reset_id(struct mail_index_view *view, struct mail_index_map *map, uint32_t ext_id, uint32_t *reset_id_r) argument
568 mail_index_ext_get_size(struct mail_index_map *map, uint32_t ext_id, uint32_t *hdr_size_r, uint16_t *record_size_r, uint16_t *record_align_r) argument
606 mail_index_view_open_with_map(struct mail_index *index, struct mail_index_map *map) argument
[all...]
H A Dmail-index-fsck.c23 if (hdr->field oper map->hdr.field) { \
25 map->hdr.field, hdr->field); \
29 mail_index_fsck_log_pos(struct mail_index *index, struct mail_index_map *map, argument
61 if (hdr->log_file_seq == map->hdr.log_file_seq) {
69 mail_index_fsck_header(struct mail_index *index, struct mail_index_map *map, argument
78 mail_index_fsck_log_pos(index, map, hdr);
94 mail_index_fsck_find_keyword_count(struct mail_index_map *map, argument
104 rec = map->rec_map->records;
105 for (r = 0; r < map->rec_map->records_count; r++) {
120 rec = CONST_PTR_OFFSET(rec, map
140 mail_index_fsck_keywords(struct mail_index *index, struct mail_index_map *map, struct mail_index_header *hdr, const struct mail_index_ext_header *ext_hdr, unsigned int ext_offset, unsigned int *offset_p) argument
269 mail_index_fsck_extensions(struct mail_index *index, struct mail_index_map *map, struct mail_index_header *hdr) argument
327 mail_index_fsck_records(struct mail_index *index, struct mail_index_map *map, struct mail_index_header *hdr) argument
419 mail_index_fsck_map(struct mail_index *index, struct mail_index_map *map) argument
444 struct mail_index_map *map; local
[all...]
H A Dtest-mail-index-sync-ext.c13 mail_index_sync_get_atomic_map(struct mail_index_sync_map_ctx *ctx) { return ctx->view->map; }
15 mail_index_map_register_ext(struct mail_index_map *map ATTR_UNUSED,
21 bool mail_index_map_lookup_ext(struct mail_index_map *map ATTR_UNUSED,
46 ctx.view->map = t_new(struct mail_index_map, 1);
47 ctx.view->map->hdr.next_uid = 2;
48 ctx.view->map->hdr.record_size = sizeof(struct mail_index_record) + 16;
49 ctx.view->map->rec_map = t_new(struct mail_index_record_map, 1);
50 ctx.view->map->rec_map->records =
51 t_malloc0(ctx.view->map->hdr.record_size);
52 t_array_init(&ctx.view->map
[all...]
H A Dmail-index-map-read.c13 static void mail_index_map_copy_hdr(struct mail_index_map *map, argument
16 if (hdr->base_header_size < sizeof(map->hdr)) {
19 i_zero(&map->hdr);
20 memcpy(&map->hdr, hdr, hdr->base_header_size);
22 map->hdr = *hdr;
27 map->hdr.unused_old_recent_messages_count = 0;
30 static int mail_index_mmap(struct mail_index_map *map, uoff_t file_size) argument
32 struct mail_index *index = map->index;
33 struct mail_index_record_map *rec_map = map->rec_map;
41 /* too large file to map int
131 mail_index_try_read_map(struct mail_index_map *map, uoff_t file_size, bool *retry_r, bool try_retry) argument
250 mail_index_read_map(struct mail_index_map *map, uoff_t file_size) argument
[all...]
H A Dmail-index-sync-keywords.c15 struct mail_index_map *map = ctx->view->map; local
19 if (array_is_created(&map->keyword_idx_map) &&
23 idx_map = array_get(&map->keyword_idx_map, &count);
35 keywords_get_header_buf(struct mail_index_map *map, argument
48 kw_hdr = CONST_PTR_OFFSET(map->hdr_base, ext->hdr_offset);
117 struct mail_index_map *map; local
129 map = mail_index_sync_get_atomic_map(ctx);
131 if (!mail_index_map_lookup_ext(map, MAIL_INDEX_EXT_KEYWORDS,
136 ext = array_idx(&map
321 struct mail_index_map *map = ctx->view->map; local
[all...]
H A Dmail-index-write.c62 struct mail_index_map *map = index->map; local
69 i_assert(map->hdr.indexid == index->indexid);
70 i_assert((map->hdr.flags & MAIL_INDEX_HDR_FLAG_CORRUPTED) == 0);
80 base_size = I_MIN(map->hdr.base_header_size, sizeof(map->hdr));
81 o_stream_nsend(output, &map->hdr, base_size);
82 o_stream_nsend(output, CONST_PTR_OFFSET(map->hdr_base, base_size),
83 map->hdr.header_size - base_size);
84 o_stream_nsend(output, map
121 struct mail_index_map *map = index->map; local
[all...]
H A Dmail-index-private.h29 #define MAIL_INDEX_MAP_IS_IN_MEMORY(map) \
30 ((map)->rec_map->mmap_base == NULL)
32 #define MAIL_INDEX_MAP_IDX(map, idx) \
34 PTR_OFFSET((map)->rec_map->records, (idx) * (map)->hdr.record_size))
35 #define MAIL_INDEX_REC_AT_SEQ(map, seq) \
37 PTR_OFFSET((map)->rec_map->records, ((seq)-1) * (map)->hdr.record_size))
185 struct mail_index_map *map; member in struct:mail_index
265 /* Update/rewrite the main index file from index->map */
[all...]
H A Dmail-index-sync-ext.c23 if (!array_is_created(&ctx->view->map->extensions))
33 ext = array_get(&ctx->view->map->extensions, &ext_count);
34 id_map = array_get(&ctx->view->map->ext_id_map, &id_map_count);
78 if (!array_is_created(&ctx->view->map->extensions))
120 get_ext_header(struct mail_index_map *map, const struct mail_index_ext *ext) argument
126 hdr_base = buffer_get_modifiable_data(map->hdr_copy_buf, NULL);
140 static void sync_ext_reorder(struct mail_index_map *map, uint32_t ext_map_idx, argument
152 i_assert(MAIL_INDEX_MAP_IS_IN_MEMORY(map) && map->refcount == 1);
154 ext = array_get_modifiable(&map
263 struct mail_index_map *map; local
385 struct mail_index_map *map; local
437 struct mail_index_map *map = ctx->view->map; local
471 struct mail_index_map *map = ctx->view->map; local
568 mail_index_sync_ext_clear(struct mail_index_view *view, struct mail_index_map *map, struct mail_index_ext *ext) argument
590 struct mail_index_map *map; local
624 struct mail_index_map *map = ctx->view->map; local
[all...]
H A Dmail-index-modseq.c63 if (!mail_index_map_get_ext_idx(index->map, index->modseq_ext_id,
78 /* get the modseq extension to index map */
79 if (!mail_index_map_get_ext_idx(index->map,
91 return mail_index_map_get_modseq_header(index->map) != NULL;
95 mail_index_map_get_modseq_header(struct mail_index_map *map) argument
100 if (!mail_index_map_get_ext_idx(map, map->index->modseq_ext_id, &idx))
103 ext = array_idx(&map->extensions, idx);
107 return CONST_PTR_OFFSET(map->hdr_base, ext->hdr_offset);
110 uint64_t mail_index_map_modseq_get_highest(struct mail_index_map *map) argument
155 struct mail_index_map *map; local
390 struct mail_index_map *map = ctx->view->map; local
484 struct mail_index_map *map = view->map; local
[all...]
H A Dmail-index-view-private.h35 struct mail_index_map *map, uint32_t ext_id,
38 struct mail_index_map *map,
61 struct mail_index_map *map; member in struct:mail_index_view
88 struct mail_index_map *map);
H A Dmail-index-view-sync.c17 /* After syncing view, map is replaced with sync_new_map. */
47 const struct mail_index_header *hdr = &view->index->map->hdr;
79 "Failed to map view for %s: %s",
329 struct mail_index_map *old_map = ctx->view->map;
330 struct mail_index_map *new_map = ctx->view->index->map;
401 we last sent to the client (because the map is shared). This could
402 be avoided by always keeping a private copy of the map in the view,
414 struct mail_index_map *old_map = view->map;
415 struct mail_index_map *new_map = view->index->map;
422 /* we don't update the map i
[all...]
H A Dmail-index-modseq.h27 mail_index_map_get_modseq_header(struct mail_index_map *map);
28 uint64_t mail_index_map_modseq_get_highest(struct mail_index_map *map);
/dovecot/src/lib-storage/index/dbox-multi/
H A Dmdbox-map.c12 #include "mdbox-map-private.h"
21 #define MAP_STORAGE(map) (&(map)->storage->storage.storage)
31 static int mdbox_map_generate_uid_validity(struct mdbox_map *map);
33 void mdbox_map_set_corrupted(struct mdbox_map *map, const char *format, ...) argument
38 mail_storage_set_critical(MAP_STORAGE(map),
39 "mdbox map %s corrupted: %s",
40 map->index->filepath,
44 mdbox_storage_set_corrupted(map->storage);
50 struct mdbox_map *map; local
82 struct mdbox_map *map = *_map; local
96 mdbox_map_mkdir_storage(struct mdbox_map *map) argument
113 mdbox_map_cleanup(struct mdbox_map *map) argument
135 mdbox_map_open_internal(struct mdbox_map *map, bool create_missing) argument
199 mdbox_map_open(struct mdbox_map *map) argument
204 mdbox_map_open_or_create(struct mdbox_map *map) argument
209 mdbox_map_refresh(struct mdbox_map *map) argument
241 mdbox_map_is_fscked(struct mdbox_map *map) argument
255 mdbox_map_get_ext_hdr(struct mdbox_map *map, struct mail_index_view *view, struct mdbox_map_mail_index_header *hdr_r) argument
266 mdbox_map_get_rebuild_count(struct mdbox_map *map) argument
275 mdbox_map_lookup_seq(struct mdbox_map *map, uint32_t seq, const struct mdbox_map_mail_index_record **rec_r) argument
295 mdbox_map_get_seq(struct mdbox_map *map, uint32_t map_uid, uint32_t *seq_r) argument
307 mdbox_map_lookup(struct mdbox_map *map, uint32_t map_uid, uint32_t *file_id_r, uoff_t *offset_r) argument
327 mdbox_map_lookup_full(struct mdbox_map *map, uint32_t map_uid, struct mdbox_map_mail_index_record *rec_r, uint16_t *refcount_r) argument
343 mdbox_map_lookup_seq_full(struct mdbox_map *map, uint32_t seq, struct mdbox_map_mail_index_record *rec_r, uint16_t *refcount_r) argument
365 mdbox_map_lookup_uid(struct mdbox_map *map, uint32_t seq) argument
373 mdbox_map_get_messages_count(struct mdbox_map *map) argument
378 mdbox_map_view_lookup_rec(struct mdbox_map *map, struct mail_index_view *view, uint32_t seq, struct dbox_mail_lookup_rec *rec_r) argument
405 mdbox_map_get_file_msgs(struct mdbox_map *map, uint32_t file_id, ARRAY_TYPE(mdbox_map_file_msg) *recs) argument
432 mdbox_map_get_zero_ref_files(struct mdbox_map *map, ARRAY_TYPE(seq_range) *file_ids_r) argument
470 mdbox_map_atomic_begin(struct mdbox_map *map) argument
480 mdbox_map_sync_handle(struct mdbox_map *map, struct mail_index_sync_ctx *sync_ctx) argument
641 struct mdbox_map *map = ctx->atomic->map; local
702 mdbox_map_remove_file_id(struct mdbox_map *map, uint32_t file_id) argument
848 struct mdbox_map *map = ctx->map; local
926 struct mdbox_map *map = ctx->map; local
1014 struct mdbox_map *map = ctx->map; local
1145 mdbox_map_append_close_if_unneeded(struct mdbox_map *map, struct dbox_file_append_context *append_ctx) argument
1191 mdbox_find_highest_file_id(struct mdbox_map *map, uint32_t *file_id_r) argument
1460 mdbox_map_generate_uid_validity(struct mdbox_map *map) argument
1491 mdbox_map_get_uid_validity(struct mdbox_map *map) argument
[all...]
H A Dmdbox-map.h35 void mdbox_map_deinit(struct mdbox_map **map);
37 /* Open the map. Returns 1 if ok, 0 if map doesn't exist, -1 if error. */
38 int mdbox_map_open(struct mdbox_map *map);
39 /* Open or create the map. This is done automatically for most operations.
41 int mdbox_map_open_or_create(struct mdbox_map *map);
42 /* Refresh the map. Returns 0 if ok, -1 if error. */
43 int mdbox_map_refresh(struct mdbox_map *map);
44 /* Returns TRUE if map has been fsck'd. */
45 bool mdbox_map_is_fscked(struct mdbox_map *map);
[all...]
H A Dmdbox-map-private.h4 #include "mdbox-map.h"
33 struct mdbox_map *map; member in struct:mdbox_map_append_context
49 struct mdbox_map *map; member in struct:mdbox_map_atomic_context
60 int mdbox_map_view_lookup_rec(struct mdbox_map *map,
/dovecot/src/lib-dict-backend/
H A Ddict.conf3 map {
15 map {
27 map {
35 map {
H A Ddict-sql.c46 const struct dict_sql_map *map; member in struct:sql_dict_iterate_context
51 bool allow_null_map; /* allow next map to be NULL */
150 dict_sql_map_match(const struct dict_sql_map *map, const char *path, argument
159 pat = map->pattern;
184 *pat_len_r = pat - map->pattern;
209 *pat_len_r = pat - map->pattern;
217 if (pat != map->pattern && pat[-1] != '/')
294 sql_dict_value_get(const struct dict_sql_map *map, argument
316 field_name, value, value_suffix, map->pattern);
325 field_name, value, value_suffix, map
348 sql_dict_field_get_value(const struct dict_sql_map *map, const struct dict_sql_field *field, const char *value, const char *value_suffix, ARRAY_TYPE(sql_dict_param) *params, const char **error_r) argument
359 sql_dict_where_build(struct sql_dict *dict, const struct dict_sql_map *map, const ARRAY_TYPE(const_string) *values_arr, char key1, enum sql_recurse_type recurse_type, string_t *query, ARRAY_TYPE(sql_dict_param) *params, const char **error_r) argument
442 const struct dict_sql_map *map; local
495 sql_dict_result_unescape_value(const struct dict_sql_map *map, pool_t pool, struct sql_result *result) argument
502 sql_dict_result_unescape_values(const struct dict_sql_map *map, pool_t pool, struct sql_result *result) argument
517 sql_dict_result_unescape_field(const struct dict_sql_map *map, pool_t pool, struct sql_result *result, unsigned int result_idx, unsigned int sql_field_idx) argument
532 const struct dict_sql_map *map; local
556 const struct dict_sql_map *map; member in struct:sql_dict_lookup_context
592 const struct dict_sql_map *map; local
653 const struct dict_sql_map *map; local
1034 const struct dict_sql_map *map; member in struct:dict_sql_build_query_field
1168 const struct dict_sql_map *map; local
1209 const struct dict_sql_map *map; local
1263 const struct dict_sql_map *map; local
1360 const struct dict_sql_map *map; local
1426 const struct dict_sql_map *map; local
[all...]
H A Ddict-ldap.c26 const struct dict_ldap_map *map; member in struct:dict_ldap_op
60 dict_ldap_map_match(const struct dict_ldap_map *map, const char *path, argument
69 pat = map->pattern;
94 *pat_len_r = pat - map->pattern;
119 *pat_len_r = pat - map->pattern;
127 if (pat != map->pattern && pat[-1] != '/')
193 ldap_dict_build_query(struct ldap_dict *dict, const struct dict_ldap_map *map, argument
208 template = t_strdup_printf("(&(%s=%s)%s)", map->username_attribute, "%{username}", map->filter);
210 template = map
433 const struct dict_ldap_map *map = ldap_dict_find_map(ctx, key, &values); local
[all...]
/dovecot/src/doveadm/
H A Ddoveadm-dump-thread.c97 const void *map, *end; local
110 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
111 if (map == MAP_FAILED)
113 end = CONST_PTR_OFFSET(map, st.st_size);
114 pos = dump_hdr(map);
119 ret = dump_block(CONST_PTR_OFFSET(map, pos), end, &uid);
/dovecot/src/plugins/pop3-migration/
H A Dpop3-migration-plugin.c363 struct pop3_uidl_map *map; local
370 array_foreach_modifiable(&mstorage->pop3_uidl_map, map)
371 map->imap_uid = 0;
418 map = array_append_space(&mstorage->pop3_uidl_map);
419 map->pop3_seq = mail->seq;
420 map->pop3_uidl = p_strdup(storage->pool, uidl);
421 map->size = size;
440 struct msg_map_common *map; local
447 map = array_idx_modifiable_i(msg_map, mail->seq-1);
449 if (get_cached_hdr_sha1(mail, cache_buf, map
462 const struct msg_map_common *map; local
481 struct msg_map_common *map; local
555 struct imap_msg_map *map; local
892 struct imap_msg_map map_key, *map; local
[all...]
/dovecot/src/lib/
H A Dbloomfilter.c24 #define BITMAP_HAS_BIT(map, idx) (((map)[((idx)/CHAR_BIT)] & (0x1<<((idx)%CHAR_BIT))) != 0)
25 #define BITMAP_SET_BIT(map, idx) ((map)[((idx)/CHAR_BIT)] |= (0x1<<((idx)%CHAR_BIT)))

Completed in 100 milliseconds

123