dovecot-1.3: Changed MAILBOX_OPEN_FAST meaning a bit. Don't use ...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Apr 14 03:08:05 EEST 2009
details: http://hg.dovecot.org/dovecot-1.3/rev/2e20a1a9bcd4
changeset: 9101:2e20a1a9bcd4
user: Timo Sirainen <tss at iki.fi>
date: Mon Apr 13 20:06:40 2009 -0400
description:
Changed MAILBOX_OPEN_FAST meaning a bit. Don't use it where it's unnecessary.
diffstat:
7 files changed, 8 insertions(+), 11 deletions(-)
src/imap/cmd-append.c | 2 +-
src/imap/cmd-copy.c | 1 -
src/lib-lda/mail-deliver.c | 2 +-
src/lib-storage/index/index-status.c | 3 +--
src/lib-storage/index/index-transaction.c | 3 +--
src/lib-storage/mail-storage.h | 4 ++--
src/plugins/quota/quota-storage.c | 4 ++--
diffs (89 lines):
diff -r be8d15cb98e7 -r 2e20a1a9bcd4 src/imap/cmd-append.c
--- a/src/imap/cmd-append.c Mon Apr 13 19:20:55 2009 -0400
+++ b/src/imap/cmd-append.c Mon Apr 13 20:06:40 2009 -0400
@@ -461,7 +461,7 @@ get_mailbox(struct client_command_contex
return cmd->client->mailbox;
box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_SAVEONLY |
- MAILBOX_OPEN_FAST | MAILBOX_OPEN_KEEP_RECENT);
+ MAILBOX_OPEN_KEEP_RECENT);
if (box == NULL) {
client_send_storage_error(cmd, storage);
return NULL;
diff -r be8d15cb98e7 -r 2e20a1a9bcd4 src/imap/cmd-copy.c
--- a/src/imap/cmd-copy.c Mon Apr 13 19:20:55 2009 -0400
+++ b/src/imap/cmd-copy.c Mon Apr 13 20:06:40 2009 -0400
@@ -128,7 +128,6 @@ bool cmd_copy(struct client_command_cont
else {
destbox = mailbox_open(&storage, mailbox, NULL,
MAILBOX_OPEN_SAVEONLY |
- MAILBOX_OPEN_FAST |
MAILBOX_OPEN_KEEP_RECENT);
if (destbox == NULL) {
client_send_storage_error(cmd, storage);
diff -r be8d15cb98e7 -r 2e20a1a9bcd4 src/lib-lda/mail-deliver.c
--- a/src/lib-lda/mail-deliver.c Mon Apr 13 19:20:55 2009 -0400
+++ b/src/lib-lda/mail-deliver.c Mon Apr 13 20:06:40 2009 -0400
@@ -78,7 +78,7 @@ mailbox_open_or_create_synced(struct mai
struct mail_namespace *ns;
struct mailbox *box;
enum mail_error error;
- enum mailbox_open_flags open_flags = MAILBOX_OPEN_FAST |
+ enum mailbox_open_flags open_flags =
MAILBOX_OPEN_KEEP_RECENT | MAILBOX_OPEN_SAVEONLY |
MAILBOX_OPEN_POST_SESSION;
diff -r be8d15cb98e7 -r 2e20a1a9bcd4 src/lib-storage/index/index-status.c
--- a/src/lib-storage/index/index-status.c Mon Apr 13 19:20:55 2009 -0400
+++ b/src/lib-storage/index/index-status.c Mon Apr 13 20:06:40 2009 -0400
@@ -11,8 +11,7 @@ void index_storage_get_status(struct mai
struct index_mailbox *ibox = (struct index_mailbox *)box;
const struct mail_index_header *hdr;
- if (!box->opened)
- index_storage_mailbox_open(ibox);
+ i_assert(box->opened);
memset(status_r, 0, sizeof(struct mailbox_status));
diff -r be8d15cb98e7 -r 2e20a1a9bcd4 src/lib-storage/index/index-transaction.c
--- a/src/lib-storage/index/index-transaction.c Mon Apr 13 19:20:55 2009 -0400
+++ b/src/lib-storage/index/index-transaction.c Mon Apr 13 20:06:40 2009 -0400
@@ -66,8 +66,7 @@ index_transaction_begin(struct mailbox *
struct index_transaction_context *it;
enum mail_index_transaction_flags trans_flags;
- if (!box->opened)
- index_storage_mailbox_open(ibox);
+ i_assert(box->opened);
trans_flags = MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES;
if ((flags & MAILBOX_TRANSACTION_FLAG_HIDE) != 0)
diff -r be8d15cb98e7 -r 2e20a1a9bcd4 src/lib-storage/mail-storage.h
--- a/src/lib-storage/mail-storage.h Mon Apr 13 19:20:55 2009 -0400
+++ b/src/lib-storage/mail-storage.h Mon Apr 13 20:06:40 2009 -0400
@@ -28,8 +28,8 @@ enum mailbox_open_flags {
MAILBOX_OPEN_READONLY = 0x01,
/* Only saving/copying mails to mailbox works. */
MAILBOX_OPEN_SAVEONLY = 0x02,
- /* Any extra time consuming operations shouldn't be performed
- (eg. when opening mailbox just for STATUS). */
+ /* Delay opening index files (and possibly other files) until mailbox
+ is being synchronized. */
MAILBOX_OPEN_FAST = 0x04,
/* Don't reset MAIL_RECENT flags when syncing */
MAILBOX_OPEN_KEEP_RECENT = 0x08,
diff -r be8d15cb98e7 -r 2e20a1a9bcd4 src/plugins/quota/quota-storage.c
--- a/src/plugins/quota/quota-storage.c Mon Apr 13 19:20:55 2009 -0400
+++ b/src/plugins/quota/quota-storage.c Mon Apr 13 20:06:40 2009 -0400
@@ -434,8 +434,8 @@ quota_mailbox_list_delete(struct mailbox
mailbox locked so that other processes can't mess up the quota
calculations by adding/removing mails while we're doing this. */
storage = qlist->storage;
- box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_FAST |
- MAILBOX_OPEN_KEEP_RECENT | MAILBOX_OPEN_KEEP_LOCKED);
+ box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_KEEP_RECENT |
+ MAILBOX_OPEN_KEEP_LOCKED);
if (box == NULL) {
str = mail_storage_get_last_error(qlist->storage, &error);
if (error != MAIL_ERROR_NOTPOSSIBLE) {
More information about the dovecot-cvs
mailing list