[dovecot-cvs] dovecot/src/lib-index mail-index-sync-ext.c, 1.22, 1.23
tss at dovecot.org
tss at dovecot.org
Wed Jan 17 14:57:13 UTC 2007
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-index-sync-ext.c, 1.16.2.2, 1.16.2.3
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-index-lock.c, 1.54.2.2, 1.54.2.3 mail-index-view.c, 1.44.2.4, 1.44.2.5 mail-index.c, 1.230.2.13, 1.230.2.14 mail-transaction-log-view.c, 1.45.2.3, 1.45.2.4 mail-transaction-log.c, 1.111.2.7, 1.111.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv27001
Modified Files:
mail-index-sync-ext.c
Log Message:
A new "extension introduction" in transaction log could have left some
existing views to contain an invalid mapping where it contained the new
extension, but with a wrong record_size.
Index: mail-index-sync-ext.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-ext.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- mail-index-sync-ext.c 10 Sep 2006 12:48:18 -0000 1.22
+++ mail-index-sync-ext.c 17 Jan 2007 14:57:11 -0000 1.23
@@ -381,6 +381,18 @@
return 1;
}
+ if (map->refcount != 1) {
+ /* below we'll first add the extension to the mapping, and then
+ call sync_ext_reorder() which clones the map. that however
+ leaves this mapping with the new extension, but without
+ a resized record_size. if the mapping is still used
+ elsewhere, it will create problems. so here we'll just make
+ sure that the partially updated mapping will get destroyed
+ once the resize is complete. */
+ map = mail_index_map_clone(map, map->hdr.record_size);
+ mail_index_sync_replace_map(ctx, map);
+ }
+
hdr_buf = map->hdr_copy_buf;
if (MAIL_INDEX_HEADER_SIZE_ALIGN(hdr_buf->used) != hdr_buf->used) {
/* we need to add padding between base header and extensions */
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-index-sync-ext.c, 1.16.2.2, 1.16.2.3
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-index-lock.c, 1.54.2.2, 1.54.2.3 mail-index-view.c, 1.44.2.4, 1.44.2.5 mail-index.c, 1.230.2.13, 1.230.2.14 mail-transaction-log-view.c, 1.45.2.3, 1.45.2.4 mail-transaction-log.c, 1.111.2.7, 1.111.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list