Mercurial > dovecot > core-2.2
view src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.h @ 11647:612df9b3df83 HEAD
mdbox: Modified map locking behavior to avoid deadlocks when rebuilding storage.
If both mailbox and map index need to be locked, the map index must now be
locked first. Mailbox syncing optimistically tries to first sync without
map locking, but if it sees expunges, it restarts with the map lock.
The map lock is held now slightly longer during sync than before, but it
shouldn't be noticeable.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 28 Jun 2010 16:47:34 +0100 |
parents | 0bb321c347ae |
children |
line wrap: on
line source
#ifndef MDBOX_STORAGE_REBUILD_H #define MDBOX_STORAGE_REBUILD_H struct mdbox_map_atomic_context; int mdbox_storage_rebuild_in_context(struct mdbox_storage *storage, struct mdbox_map_atomic_context *atomic); int mdbox_storage_rebuild(struct mdbox_storage *storage); #endif