mail-transaction-log.c revision 2af769daebd83719ac696a440e06f6020471cec0
691N/A#include "file-dotlock.h"
691N/A#include "read-full.h"
691N/A#include "write-full.h"
691N/A#include "mmap-util.h"
691N/A#include "mail-index-private.h"
691N/A#include "mail-index-view-private.h"
691N/A#include "mail-transaction-log-private.h"
691N/A#include "mail-transaction-util.h"
691N/A#include "mail-index-transaction-private.h"
691N/A#define LOG_DOTLOCK_STALE_TIMEOUT 0
691N/Astatic struct mail_transaction_log_file *
3339N/A sizeof(struct mail_transaction_log_header)) || \
3339N/Astruct mail_transaction_log *
unsigned int lock_id;
fd);
return fd2;
if (ret < 0)
if (fd2 < 0) {
return fd2;
if (fd2 < 0) {
return fd2;
static struct mail_transaction_log_file *
struct mail_transaction_log_file **p;
int ret;
return NULL;
if (ret == 0) {
if (ret <= 0) {
return NULL;
*p = file;
return file;
static struct mail_transaction_log_file *
const char *path)
int fd;
return NULL;
return NULL;
if ((*p)->refcount != 0)
p = &(*p)->next;
*p = next;
int fd;
if (lock) {
unsigned int lock_id;
int ret;
return ret;
const char *path;
const void *data;
if (hdr_size == 0) {
void *data;
int ret;
if (ret == 0) {
if (ret < 0) {
if (ret > 0)
if (ret == 0) {
if (!use_mmap) {
if (ret <= 0) {
return ret;
MADV_SEQUENTIAL) < 0) {
int ret = 0;
if (ret < 0)
return ret;
if (size == 0)
hdr_data_size = 0;
if (external)
hdr_size =
if (hdr_data_size > 0) {
static const buffer_t *
struct mail_transaction_header_update u;
int state = 0;
memset(&u, 0, sizeof(u));
if (state == 0) {
state++;
if (state > 0) {
u.size);
state = 0;
return buf;
struct mail_index_transaction *t,
size = 0;
if (reset_id != 0) {
t->external);
struct mail_index_transaction *t)
update_count = 0;
resize_count = 0;
reset_count = 0;
t->external) < 0)
struct mail_index_transaction *t)
size = 0;
reset_count = 0;
t->external) < 0)
unsigned int lock_id;
int ret;
if (!t->log_updates) {
*log_file_seq_r = 0;
*log_file_offset_r = 0;
ret = 0;
t->external);
t->external);
if (ret < 0) {
t->hide_transaction) {
if (ret < 0) {
if (ret < 0)
return ret;