dovecot: Fixes to NFS read cache flushing.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 30 16:45:39 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/d79975141df2
changeset: 6510:d79975141df2
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 30 16:45:36 2007 +0300
description:
Fixes to NFS read cache flushing.
diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
src/lib-index/mail-cache-compress.c | 3 +--
src/lib-index/mail-cache-sync-update.c | 3 ++-
diffs (32 lines):
diff -r d0689497bb11 -r d79975141df2 src/lib-index/mail-cache-compress.c
--- a/src/lib-index/mail-cache-compress.c Sun Sep 30 16:27:12 2007 +0300
+++ b/src/lib-index/mail-cache-compress.c Sun Sep 30 16:45:36 2007 +0300
@@ -307,7 +307,6 @@ static int mail_cache_compress_has_file_
return -1;
}
- mail_cache_flush_read_cache(cache, FALSE);
ret = read_full(fd, &hdr, sizeof(hdr));
close_keep_errno(fd);
@@ -338,7 +337,7 @@ static int mail_cache_compress_locked(st
unsigned int i, count;
int fd, ret;
- if (cache->fd != -1)
+ if (!MAIL_CACHE_IS_UNUSABLE(cache))
mail_cache_flush_read_cache(cache, TRUE);
/* get the latest info on fields */
diff -r d0689497bb11 -r d79975141df2 src/lib-index/mail-cache-sync-update.c
--- a/src/lib-index/mail-cache-sync-update.c Sun Sep 30 16:27:12 2007 +0300
+++ b/src/lib-index/mail-cache-sync-update.c Sun Sep 30 16:45:36 2007 +0300
@@ -159,6 +159,7 @@ int mail_cache_sync_handler(struct mail_
void mail_cache_sync_lost_handler(struct mail_index *index)
{
- mail_cache_flush_read_cache(index->cache, FALSE);
+ if (!MAIL_CACHE_IS_UNUSABLE(index->cache))
+ mail_cache_flush_read_cache(index->cache, FALSE);
file_cache_invalidate(index->cache->file_cache, 0, (uoff_t)-1);
}
More information about the dovecot-cvs
mailing list