/* lock the mailbox after map to avoid deadlocks. if we've noticed
any corruption, deal with it later, otherwise we won't have
up-to-date atomic->sync_view */
- if (mdbox_sync_begin(ctx->mbox, MDBOX_SYNC_FLAG_NO_PURGE |
+ if (mdbox_sync_begin(ctx->mbox,
MDBOX_SYNC_FLAG_FORCE |
MDBOX_SYNC_FLAG_FSYNC, ctx->atomic,
&ctx->sync_ctx, &corrupted) < 0) {
return 0;
}
-int mdbox_storage_rebuild_in_context(struct mdbox_storage *storage,
- struct mdbox_map_atomic_context *atomic)
+static int
+mdbox_storage_rebuild_in_context(struct mdbox_storage *storage,
+ struct mdbox_map_atomic_context *atomic)
{
struct mdbox_storage_rebuild_context *ctx;
int ret;
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
MDBOX_SYNC_FLAG_FORCE = 0x01,
MDBOX_SYNC_FLAG_FSYNC = 0x02,
MDBOX_SYNC_FLAG_FORCE_REBUILD = 0x04,
- MDBOX_SYNC_FLAG_NO_PURGE = 0x08,
};
struct mdbox_sync_context {