return TRUE;
}
if (file->lock != NULL) {
- /* already locked, we're possibly in the middle of cleaning
- it up in which case we really don't want to write there. */
+ /* already locked, we're possibly in the middle of purging it
+ in which case we really don't want to write there. */
dbox_file_unref(&file);
return TRUE;
}
return;
}
- dbox_sync_cleanup(storage);
+ dbox_sync_purge(storage);
dbox_files_free(storage);
dbox_map_deinit(&storage->map);
array_free(&storage->open_files);
return 1;
}
-int dbox_sync_file_cleanup(struct dbox_file *file)
+int dbox_sync_file_purge(struct dbox_file *file)
{
struct mail_storage *storage = &file->storage->storage;
struct dbox_file *out_file;
if (msgs[i].offset != offset) {
/* map doesn't match file's actual contents */
dbox_file_set_corrupted(file,
- "cleanup found mismatched offsets "
+ "purging found mismatched offsets "
"(%"PRIuUOFF_T" vs %u, %u/%u)",
offset, msgs[i].offset, i, count);
ret = 0;
return index_mailbox_sync_init(box, flags, ret < 0);
}
-void dbox_sync_cleanup(struct dbox_storage *storage)
+void dbox_sync_purge(struct dbox_storage *storage)
{
const ARRAY_TYPE(seq_range) *ref0_file_ids;
struct dbox_file *file;
while (seq_range_array_iter_nth(&iter, i++, &file_id)) T_BEGIN {
file = dbox_file_init_multi(storage, file_id);
if (dbox_file_open_or_create(file, &deleted) > 0 && !deleted)
- (void)dbox_sync_file_cleanup(file);
+ (void)dbox_sync_file_purge(file);
else
dbox_map_remove_file_id(storage->map, file_id);
dbox_file_unref(&file);
int dbox_sync_finish(struct dbox_sync_context **ctx, bool success);
int dbox_sync(struct dbox_mailbox *mbox);
-void dbox_sync_cleanup(struct dbox_storage *storage);
+void dbox_sync_purge(struct dbox_storage *storage);
int dbox_sync_file(struct dbox_sync_context *ctx,
const struct dbox_sync_file_entry *entry);
-int dbox_sync_file_cleanup(struct dbox_file *file);
+int dbox_sync_file_purge(struct dbox_file *file);
struct dbox_sync_rebuild_context *
dbox_sync_index_rebuild_init(struct dbox_mailbox *mbox,