[dovecot-cvs] dovecot/src/lib-index mail-index-fsck.c, 1.25,
1.26 mail-index-private.h, 1.41, 1.42 mail-index-sync-update.c,
1.70, 1.71 mail-index.c, 1.176, 1.177
cras at dovecot.org
cras at dovecot.org
Sun Dec 5 03:41:48 EET 2004
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache-private.h, 1.19,
1.20 mail-cache-sync-update.c, 1.6, 1.7 mail-cache.c, 1.57,
1.58 mail-index-private.h, 1.40, 1.41 mail-index.c, 1.175, 1.176
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-cache.c, 1.58,
1.59 mail-index-lock.c, 1.37, 1.38 mail-index-private.h, 1.42,
1.43 mail-index-view.c, 1.30, 1.31 mail-index.c, 1.177,
1.178 mail-index.h, 1.138, 1.139
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv16452/lib-index
Modified Files:
mail-index-fsck.c mail-index-private.h
mail-index-sync-update.c mail-index.c
Log Message:
Don't try to fsck when we're modifying index. It could have happened with
corrupted transaction logs.
Index: mail-index-fsck.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-fsck.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mail-index-fsck.c 4 Dec 2004 21:56:19 -0000 1.25
+++ mail-index-fsck.c 5 Dec 2004 01:41:45 -0000 1.26
@@ -114,6 +114,11 @@
uoff_t file_offset;
int ret, lock_log;
+ if (index->sync_update) {
+ /* we're modifying index, don't do anything */
+ return 1;
+ }
+
lock_log = !index->log_locked;
if (lock_log) {
if (mail_transaction_log_sync_lock(index->log, &file_seq,
Index: mail-index-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-private.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- mail-index-private.h 5 Dec 2004 01:38:17 -0000 1.41
+++ mail-index-private.h 5 Dec 2004 01:41:45 -0000 1.42
@@ -127,6 +127,7 @@
unsigned int mmap_no_write:1;
unsigned int readonly:1;
unsigned int fsck:1;
+ unsigned int sync_update:1;
};
enum mail_index_sync_handler_type {
Index: mail-index-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-update.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- mail-index-sync-update.c 4 Dec 2004 22:04:45 -0000 1.70
+++ mail-index-sync-update.c 5 Dec 2004 01:41:45 -0000 1.71
@@ -1108,6 +1108,9 @@
if (had_dirty)
map->hdr.flags &= ~MAIL_INDEX_HDR_FLAG_HAVE_DIRTY;
+ /* make sure we don't go doing fsck while modifying the index */
+ index->sync_update = TRUE;
+
first_append_uid = 0;
check_ext_offsets = TRUE;
while ((ret = mail_transaction_log_view_next(view->log_view, &thdr,
@@ -1163,6 +1166,8 @@
map = view->map;
mail_index_sync_map_deinit(&sync_map_ctx);
+ index->sync_update = FALSE;
+
if (ret < 0) {
mail_index_view_unlock(view);
return -1;
Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -r1.176 -r1.177
--- mail-index.c 5 Dec 2004 01:38:17 -0000 1.176
+++ mail-index.c 5 Dec 2004 01:41:45 -0000 1.177
@@ -657,8 +657,10 @@
if ((*map)->hdr.indexid != 0) {
/* sync this as a view from transaction log. */
+ index->sync_update = TRUE;
ret = mail_index_sync_from_transactions(index, map,
sync_to_index);
+ index->sync_update = FALSE;
if (ret != 0)
return ret;
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache-private.h, 1.19,
1.20 mail-cache-sync-update.c, 1.6, 1.7 mail-cache.c, 1.57,
1.58 mail-index-private.h, 1.40, 1.41 mail-index.c, 1.175, 1.176
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-cache.c, 1.58,
1.59 mail-index-lock.c, 1.37, 1.38 mail-index-private.h, 1.42,
1.43 mail-index-view.c, 1.30, 1.31 mail-index.c, 1.177,
1.178 mail-index.h, 1.138, 1.139
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list