mdbox-map.c revision a43a6ba2308fdb013c73ae00d959d2846aa1ce5e
d1eec04fac1f40f4d8f4c84f7f90ef6944495418Timo Sirainen/* Copyright (c) 2007-2010 Dovecot authors, see the included COPYING file */
d1eec04fac1f40f4d8f4c84f7f90ef6944495418Timo Sirainen#define DBOX_FORCE_PURGE_MIN_BYTES (1024*1024*10)
d1eec04fac1f40f4d8f4c84f7f90ef6944495418Timo Sirainen#define MAP_STORAGE(map) (&(map)->storage->storage.storage)
d1eec04fac1f40f4d8f4c84f7f90ef6944495418Timo Sirainenstatic int mdbox_map_generate_uid_validity(struct mdbox_map *map);
struct mdbox_map *
const char *path)
sizeof(struct mdbox_map_mail_index_header),
sizeof(struct mdbox_map_mail_index_record),
sizeof(uint32_t));
return map;
MAILBOX_LIST_PATH_TYPE_DIR) < 0) {
int ret;
if (create_missing) {
if (ret < 0) {
if (ret == 0) {
bool delayed_expunges;
const void *data;
const void *data;
bool expunged;
int ret;
return ret;
const void *data;
bool expunged;
int ret;
return ret;
const void *data;
bool expunged;
const void *data;
bool expunged;
int ret;
return ret;
if (*ref16_p != 0)
struct mdbox_map_transaction_context *
if (external)
return ctx;
int ret;
if (ret <= 0) {
const void *data;
bool expunged;
map_uid);
map_uid);
unsigned int i, count;
for (i = 0; i < count; i++) {
const void *data;
bool expunged;
int ret = 0;
if (ret == 0)
return ret;
struct mdbox_map_append_context *
return ctx;
if (interval == 0)
bool notfound;
if (want_altpath) {
return FALSE;
return FALSE;
if (notfound)
return FALSE;
return FALSE;
return FALSE;
return TRUE;
bool want_altpath,
int ret;
return TRUE;
return TRUE;
return !file_too_old;
unsigned int i, count;
for (i = 0; i < count; i++) {
return TRUE;
return FALSE;
static struct dbox_file_append_context *
unsigned int i, count;
return NULL;
return append;
return NULL;
struct dirent *d;
int ret = 0;
&file_id) < 0)
if (errno != 0) {
if (ret < 0)
unsigned int backwards_lookup_count;
bool retry_later;
if (!want_altpath)
seq++;
int ret;
if (ret > 0)
else if (ret < 0)
if (ret <= 0) {
if (!existing) {
unsigned int count;
bool separate_transaction)
unsigned int i, count;
int ret;
if (ret <= 0) {
for (i = 0; i < count; i++) {
if (ret < 0) {
file_id--;
unsigned int i, count;
int ret = 0;
*first_map_uid_r = 0;
*last_map_uid_r = 0;
for (i = 0; i < count; i++) {
return ret;
for (i = j = 0; i < map_uids_count; i++) {
i_unreached();
i_unreached();
unsigned int i, count;
for (i = 0; i < count; i++) {
unsigned int i, count;
for (i = 0; i < count; i++) {
for (i = 0; i < count; i++) {
int ret;
if (ret <= 0) {
if (uid_validity == 0)
return uid_validity;