Lines Matching refs:offset
12 int mail_cache_get_record(struct mail_cache *cache, uint32_t offset,
19 i_assert(offset != 0);
21 if (offset % sizeof(uint32_t) != 0) {
23 mail_cache_set_corrupted(cache, "invalid record offset");
28 if (mail_cache_map(cache, offset, sizeof(*rec) + CACHE_PREFETCH,
32 if (offset + sizeof(*rec) > cache->mmap_length) {
44 if ((ret = mail_cache_map(cache, offset, rec->size, &data)) < 0)
63 uint32_t offset;
70 offset = *((const uint32_t *)data);
71 if (offset == 0)
76 return offset;
83 uint32_t offset, reset_id;
86 offset = mail_cache_lookup_cur_offset(view, seq, &reset_id);
87 if (offset == 0)
90 /* reset_id must match file_seq or the offset is for a different cache
109 *offset_r = offset;
114 uoff_t offset, uoff_t size)
116 i_assert(offset != 0);
124 loop_track->min_offset = offset;
125 loop_track->max_offset = offset + size;
127 if (loop_track->min_offset > offset)
128 loop_track->min_offset = offset;
129 if (loop_track->max_offset < offset + size)
130 loop_track->max_offset = offset + size;
152 /* look up the first offset */
154 &ctx->offset);
189 ctx->offset = ctx->rec->prev_offset;
190 if (ctx->offset == 0) {
208 ctx->seq, &ctx->offset) <= 0)
220 if (mail_cache_get_record(view->cache, ctx->offset, &ctx->rec) < 0)
222 if (mail_cache_track_loops(&view->loop_track, ctx->offset,
277 if (mail_cache_get_record(cache, ctx->offset, &ctx->rec) < 0)
301 field_r->offset = ctx->offset + ctx->pos;
651 uint32_t offset, reset_id;
656 offset = mail_cache_lookup_cur_offset(view->view, seq, &reset_id);
657 if (offset != 0) {