Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5973:fe9da9c92cf4 HEAD
Added MAIL_STORAGE_FLAG_NFS_FLUSH_STORAGE and
MAIL_STORAGE_FLAG_NFS_FLUSH_INDEX flags. Pass FLUSH_INDEX to index open
flags.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 12 Jul 2007 23:56:13 +0300 |
parents | 9fb9dc4d8df8 |
children | b88278b5d8d3 |
files | src/lib-storage/index/index-storage.c src/lib-storage/mail-storage.h |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-storage.c Thu Jul 12 23:55:08 2007 +0300 +++ b/src/lib-storage/index/index-storage.c Thu Jul 12 23:56:13 2007 +0300 @@ -367,6 +367,8 @@ index_flags |= MAIL_INDEX_OPEN_FLAG_MMAP_DISABLE; if ((storage->flags & MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL) != 0) index_flags |= MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL; + if ((storage->flags & MAIL_STORAGE_FLAG_NFS_FLUSH_INDEX) != 0) + index_flags |= MAIL_INDEX_OPEN_FLAG_NFS_FLUSH; ret = mail_index_open(ibox->index, index_flags, storage->lock_method); if (ret <= 0 || ibox->move_to_memory) {
--- a/src/lib-storage/mail-storage.h Thu Jul 12 23:55:08 2007 +0300 +++ b/src/lib-storage/mail-storage.h Thu Jul 12 23:56:13 2007 +0300 @@ -32,7 +32,10 @@ fail to create the storage. */ MAIL_STORAGE_FLAG_NO_AUTOCREATE = 0x200, /* Rely on O_EXCL when creating dotlocks */ - MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL = 0x400 + MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL = 0x400, + /* Flush NFS caches for mail storage / index */ + MAIL_STORAGE_FLAG_NFS_FLUSH_STORAGE = 0x800, + MAIL_STORAGE_FLAG_NFS_FLUSH_INDEX = 0x1000, }; enum mailbox_open_flags {