return 0;
box = mailbox_alloc(info->ns->list, info->vname, MAILBOX_FLAG_IGNORE_ACLS);
- mailbox_set_reason(box, "mailbox list rebuild");
if (mailbox_get_metadata(box, MAILBOX_METADATA_GUID, &metadata) < 0) {
mail_storage_set_critical(rebuild_ns->ns->storage,
"List rebuild: Couldn't lookup mailbox %s GUID: %s",
e_debug(box->event, "Mailbox GUID %s exists in storage, but not in list index",
guid_128_to_string(guid_p));
- mailbox_set_reason(box, "mailbox list rebuild restore");
box->corrupted_mailbox_name = TRUE;
if (mailbox_exists(box, FALSE, &existence) < 0) {
mail_storage_set_critical(storage,
this avoids race conditions between other list rebuilds and also
makes sure that other processes creating/deleting mailboxes can't
cause confusion with race conditions. */
+ struct event_reason *reason =
+ event_reason_begin("storage:mailbox_list_rebuild");
if ((ret = mail_storage_list_index_rebuild_lock_lists(&ctx)) == 0)
ret = mail_storage_list_index_rebuild_ctx(&ctx);
mail_storage_list_index_rebuild_unlock_lists(&ctx);
+ event_reason_end(&reason);
} else
ret = 0;
any ACLs the user might normally have against expunging in
the mailbox. */
box = mailbox_alloc(ns->list, vname, MAILBOX_FLAG_IGNORE_ACLS);
- mailbox_set_reason(box, "autoexpunge");
if (mailbox_autoexpunge(box, autoexpunge, autoexpunge_max_mails,
expunged_count) < 0) {
e_error(box->event, "Failed to autoexpunge: %s",
struct file_lock *lock = NULL;
struct mail_namespace *ns;
unsigned int expunged_count = 0;
+ struct event_reason *reason =
+ event_reason_begin("storage:autoexpunge");
for (ns = user->namespaces; ns != NULL; ns = ns->next) {
if (ns->alias_for == NULL) {
break;
}
}
+ event_reason_end(&reason);
file_lock_free(&lock);
return expunged_count;
}