[dovecot/core] 26c937: lib-index: Make sure cache compression doesn't cle...

GitHub noreply at github.com
Mon May 23 20:30:14 UTC 2016


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: 26c937b6c6671c99a2b4ce00004189ae4bdd5e87
      https://github.com/dovecot/core/commit/26c937b6c6671c99a2b4ce00004189ae4bdd5e87
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M src/lib-index/mail-cache-compress.c

  Log Message:
  -----------
  lib-index: Make sure cache compression doesn't clear the file unneededly.

This probably never happened with current code, except when the cache file
was already broken.

mail_cache_compress() unmapped cache when map_with_read==TRUE, but we never
mapped it back. This would cause cache copying code to think cache was
unusable and not copy anything.


  Commit: 361575245e2267b7da3ebf0af616945dddf4aeb2
      https://github.com/dovecot/core/commit/361575245e2267b7da3ebf0af616945dddf4aeb2
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M src/lib-index/mail-cache-compress.c

  Log Message:
  -----------
  lib-index: Fixed assert-crash caused by previous cache compression change.

We can't call mail_cache_map() when cache file isn't open or we'll crash:

Panic: file mail-cache.c: line 468 (mail_cache_map): assertion failed: (cache->need_compress_file_seq != 0 || MAIL_INDEX_IS_IN_MEMORY(cache->index))


Compare: https://github.com/dovecot/core/compare/24234b1714ee...361575245e22


More information about the dovecot-cvs mailing list