[dovecot/core] f5bfce: lib-storage: If mail_index_header.first_recent_uid...

GitHub noreply at github.com
Tue Jul 18 16:00:17 EEST 2017


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: f5bfceed99d77760b578cebec3e76695d4b1893f
      https://github.com/dovecot/core/commit/f5bfceed99d77760b578cebec3e76695d4b1893f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M src/lib-storage/index/index-storage.h
    M src/lib-storage/index/index-sync.c

  Log Message:
  -----------
  lib-storage: If mail_index_header.first_recent_uid shrinks, reset \Recent flags

This should never happen.


  Commit: 934650a50e859d167fd1aa22e86f653aecbd13da
      https://github.com/dovecot/core/commit/934650a50e859d167fd1aa22e86f653aecbd13da
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

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

  Log Message:
  -----------
  lib-storage: Don't allow removing \Recent flags with mail_update_flags()

Reverts an ancient commit 7deb24e7453249d09741641bff0f269f68165033. I don't
know why it was added in the first place. Normally \Recent flags are
removed during sync with MAIL_INDEX_SYNC_FLAG_DROP_RECENT. This should be
enough, especially since it's not even possible to remove a single \Recent
flag - only update the first_recent_uid.

The code was also wrong: It was dropping \Recent flags even when
modify_type/flags combination didn't ask for it. Even if this was fixed,
there would still be race conditions with multiple processes since this
update is done without locking.

Fixes:
Error: Recent flags state corrupted for mailbox


  Commit: 3a61bed93bee95a3291f4f4765a36a17d47e76ba
      https://github.com/dovecot/core/commit/3a61bed93bee95a3291f4f4765a36a17d47e76ba
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

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

  Log Message:
  -----------
  lib-index: Mark index deleted if index log file is missing

This fixes all kinds of errors caused by mailbox being
deleted by another process.


  Commit: 0bee2800654c2af49033ea5d83ee49aa6193fc9f
      https://github.com/dovecot/core/commit/0bee2800654c2af49033ea5d83ee49aa6193fc9f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M src/lib-index/mail-index.c
    M src/lib-index/mail-index.h
    M src/lib-index/mail-transaction-log.c
    M src/lib-index/mail-transaction-log.h

  Log Message:
  -----------
  lib-index: Fix mail_index_get_modification_time() to work when index isn't open.

index->filepath may be NULL after a failed index open, and it's a bit unsafe
to trust that index->log->filepath isn't NULL either.  So just build the full
path from elements that are definitely non-NULL.

Also stat() only dovecot.index.log, because it's always supposed to exist.
If it doesn't, something's broken and stat()ing dovecot.index doesn't make
much sense.

This commit removes mail_transaction_log_get_mtime(), which is no longer
needed.

Fixes:
Panic: file mail-index.c: line 931 (mail_index_file_set_syscall_error): assertion failed: (filepath != NULL)


Compare: https://github.com/dovecot/core/compare/92a4803764b9...0bee2800654c


More information about the dovecot-cvs mailing list