dovecot-2.2: mbox: Fixed corruption in some usage patterns.
dovecot at dovecot.org
dovecot at dovecot.org
Wed May 13 16:28:45 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/b6ea460e7cc4
changeset: 18679:b6ea460e7cc4
user: Timo Sirainen <tss at iki.fi>
date: Wed May 13 19:24:55 2015 +0300
description:
mbox: Fixed corruption in some usage patterns.
Something like:
- first mail is being expunged
- other mails are being rewritten and they get their space from the
expunged mail
- there's not enough space for the last mail to get space
- we add more space
- we'll now need to use up the space. We can't just decide to mark the
mails dirty.
diffstat:
src/lib-storage/index/mbox/mbox-sync.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r 8973648dd361 -r b6ea460e7cc4 src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c Wed May 13 17:16:21 2015 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c Wed May 13 19:24:55 2015 +0300
@@ -689,8 +689,10 @@
}
} else if (mail_ctx->need_rewrite) {
mbox_sync_update_header(mail_ctx);
- if (sync_ctx->delay_writes) {
- /* mark it dirty and do it later */
+ if (sync_ctx->delay_writes && sync_ctx->need_space_seq == 0) {
+ /* mark it dirty and do it later. we can't do this
+ if we're in the middle of rewriting acquiring more
+ space. */
mail_ctx->dirty = TRUE;
return 0;
}
More information about the dovecot-cvs
mailing list