dovecot: NFS attribute cache flushing optimization
dovecot at dovecot.org
dovecot at dovecot.org
Thu Nov 15 02:04:44 EET 2007
details: http://hg.dovecot.org/dovecot/rev/6a5540e5a464
changeset: 6801:6a5540e5a464
user: Timo Sirainen <tss at iki.fi>
date: Thu Nov 15 02:04:21 2007 +0200
description:
NFS attribute cache flushing optimization
diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
src/lib-storage/index/maildir/maildir-uidlist.c | 8 +++++---
diffs (32 lines):
diff -r ca849e28a062 -r 6a5540e5a464 src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c Thu Nov 15 01:54:56 2007 +0200
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c Thu Nov 15 02:04:21 2007 +0200
@@ -624,7 +624,8 @@ maildir_uidlist_update_read(struct maild
}
static int
-maildir_uidlist_has_changed(struct maildir_uidlist *uidlist, bool *recreated_r)
+maildir_uidlist_has_changed(struct maildir_uidlist *uidlist, bool nfs_flush,
+ bool *recreated_r)
{
struct mail_storage *storage = uidlist->ibox->box.storage;
struct stat st;
@@ -648,7 +649,7 @@ maildir_uidlist_has_changed(struct maild
}
if ((storage->flags & MAIL_STORAGE_FLAG_NFS_FLUSH_STORAGE) != 0 &&
- UIDLIST_IS_LOCKED(uidlist)) {
+ nfs_flush) {
/* NFS: either the file hasn't been changed, or it has already
been deleted and the inodes just happen to be the same.
check if the fd is still valid. */
@@ -687,7 +688,8 @@ int maildir_uidlist_refresh(struct maild
}
if (uidlist->fd != -1) {
- ret = maildir_uidlist_has_changed(uidlist, &recreated);
+ ret = maildir_uidlist_has_changed(uidlist, nfs_flush,
+ &recreated);
if (ret <= 0)
return ret;
More information about the dovecot-cvs
mailing list