Lines Matching refs:storage

18 #include "mdbox-storage-rebuild.h"
19 #include "mdbox-storage.h"
26 struct mdbox_storage *storage;
29 pool = pool_alloconly_create("mdbox storage", 2048);
30 storage = p_new(pool, struct mdbox_storage, 1);
31 storage->storage.v = mdbox_dbox_storage_vfuncs;
32 storage->storage.storage = mdbox_storage;
33 storage->storage.storage.pool = pool;
34 return &storage->storage.storage;
40 struct mdbox_storage *storage = MDBOX_STORAGE(_storage);
43 storage->set = mail_namespace_get_driver_settings(ns, _storage);
44 storage->preallocate_space = storage->set->mdbox_preallocate_space;
55 storage->storage_dir = p_strconcat(_storage->pool, dir,
58 storage->alt_storage_dir = p_strconcat(_storage->pool,
62 i_array_init(&storage->open_files, 64);
64 storage->map = mdbox_map_init(storage, ns->list);
70 struct mdbox_storage *storage = MDBOX_STORAGE(_storage);
72 mdbox_files_free(storage);
73 mdbox_map_deinit(&storage->map);
74 timeout_remove(&storage->to_close_unused_files);
76 if (array_is_created(&storage->move_from_alt_map_uids))
77 array_free(&storage->move_from_alt_map_uids);
78 if (array_is_created(&storage->move_to_alt_map_uids))
79 array_free(&storage->move_to_alt_map_uids);
80 array_free(&storage->open_files);
141 mdbox_mailbox_alloc(struct mail_storage *storage, struct mailbox_list *list,
155 mbox->box.storage = storage;
165 mbox->storage = MDBOX_STORAGE(storage);
194 struct mdbox_storage *mstorage = MDBOX_STORAGE(box->storage);
217 mdbox_storage_set_corrupted(mbox->storage);
249 mdbox_map_get_uid_validity(mbox->storage->map);
271 if (mdbox_map_open_or_create(mbox->storage->map) < 0)
345 void mdbox_storage_set_corrupted(struct mdbox_storage *storage)
347 if (storage->corrupted) {
352 storage->corrupted = TRUE;
353 storage->corrupted_rebuild_count = (uint32_t)-1;
355 if (mdbox_map_open(storage->map) > 0 &&
356 mdbox_map_refresh(storage->map) == 0) {
357 storage->corrupted_rebuild_count =
358 mdbox_map_get_rebuild_count(storage->map);
370 struct mdbox_storage *mstorage = MDBOX_STORAGE(box->storage);
377 struct mdbox_storage *mstorage = MDBOX_DBOX_STORAGE(file->storage);