Mercurial > dovecot > core-2.2
diff src/lib-index/mail-cache-private.h @ 6703:75c48f171ad3 HEAD
Keep a separate copy of mail_cache_header when mmap_disable=yes, otherwise
it could get cleared unexpectedly.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 06 Nov 2007 20:28:01 +0200 |
parents | 76c0e3a4df7a |
children | 68bb5bec043e |
line wrap: on
line diff
--- a/src/lib-index/mail-cache-private.h Tue Nov 06 19:13:33 2007 +0200 +++ b/src/lib-index/mail-cache-private.h Tue Nov 06 20:28:01 2007 +0200 @@ -142,7 +142,13 @@ struct dotlock *dotlock; struct file_lock *file_lock; + /* mmap_disable=no: hdr points to data / NULL when cache is invalid. + mmap_disable=yes: hdr points to hdr_ro_copy. this is needed because + cache invalidation can zero the data any time */ const struct mail_cache_header *hdr; + struct mail_cache_header hdr_ro_copy; + /* hdr_copy gets updated when cache is locked and written when + unlocking and hdr_modified=TRUE */ struct mail_cache_header hdr_copy; pool_t field_pool;