Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-index/mbox/mbox-rewrite.c @ 818:3d8767d31fe2 HEAD
Don't fsck index after we've rewritten mbox - that doesn't gain us anything.
Rather just make sure the index's timestamp differs from mbox file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 21 Dec 2002 12:56:55 +0200 |
parents | 86cf24da85f1 |
children | 41ec8cadd238 |
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-rewrite.c Fri Dec 20 09:53:51 2002 +0200 +++ b/src/lib-index/mbox/mbox-rewrite.c Sat Dec 21 12:56:55 2002 +0200 @@ -1,6 +1,7 @@ /* Copyright (C) 2002 Timo Sirainen */ #include "lib.h" +#include "ioloop.h" #include "istream.h" #include "ostream.h" #include "temp-string.h" @@ -574,10 +575,9 @@ Also, we might as well be shrinking the file, in which case we can't lose data. */ if (fd_copy(tmp_fd, index->mbox_fd, dirty_offset) == 0) { - /* all ok, we need to fsck the index next time. - use set_flags because set_lock() would remove it - if we modified it directly */ - index->set_flags |= MAIL_INDEX_FLAG_FSCK; + /* All ok. Just make sure the timestamps of index and + mbox differ, so index will be updated at next sync */ + index->file_sync_stamp = ioloop_time-61; reset_dirty_flags(index); } else { mbox_set_syscall_error(index, "fd_copy()");