]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
maildir: Reverted most of changeset c92ebbedc6f9.
authorTimo Sirainen <tss@iki.fi>
Sun, 19 May 2013 22:39:52 +0000 (01:39 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 19 May 2013 22:39:52 +0000 (01:39 +0300)
If dovecot-uidlist file is recreated, it gets a new inode number, and we
should recognize by that alone that it has changed. More importantly this
forced re-reading of dovecot-uidlist clears out the RACING flag, making it
impossible to handle reappearing maildir files.

src/lib-storage/index/maildir/maildir-uidlist.c

index 84d83dddd3acc26d15a1a0f932e32160cba2498b..897904f82d4d5203f940e31951ef6cb8d5a811be 100644 (file)
@@ -100,7 +100,6 @@ struct maildir_uidlist {
        unsigned int unsorted:1;
        unsigned int have_mailbox_guid:1;
        unsigned int opened_readonly:1;
-       unsigned int reread:1;
 };
 
 struct maildir_uidlist_sync_ctx {
@@ -878,11 +877,6 @@ maildir_uidlist_has_changed(struct maildir_uidlist *uidlist, bool *recreated_r)
                *recreated_r = TRUE;
                return 1;
        }
-       if (uidlist->reread) {
-               uidlist->reread = FALSE;
-               *recreated_r = TRUE;
-               return 1;
-       }
 
        if (st.st_ino != uidlist->fd_ino ||
            !CMP_DEV_T(st.st_dev, uidlist->fd_dev)) {
@@ -2075,9 +2069,6 @@ void maildir_uidlist_add_flags(struct maildir_uidlist *uidlist,
        rec = hash_table_lookup(uidlist->files, filename);
        i_assert(rec != NULL);
 
-       if ((flags & MAILDIR_UIDLIST_REC_FLAG_RACING) != 0)
-               uidlist->reread = TRUE;
-
        rec->flags |= flags;
 }