[dovecot-cvs] dovecot/src/lib-storage/index/maildir
maildir-uidlist.c, 1.47, 1.48
cras at dovecot.org
cras at dovecot.org
Sun Feb 26 12:32:25 EET 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv27978/lib-storage/index/maildir
Modified Files:
maildir-uidlist.c
Log Message:
If we reach the NFS_ESTALE_RETRY_COUNT, give an ESTALE error message as
well.
Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- maildir-uidlist.c 26 Feb 2006 10:15:41 -0000 1.47
+++ maildir-uidlist.c 26 Feb 2006 10:32:23 -0000 1.48
@@ -247,7 +247,8 @@
}
static int
-maildir_uidlist_update_read(struct maildir_uidlist *uidlist, bool *retry_r)
+maildir_uidlist_update_read(struct maildir_uidlist *uidlist,
+ bool *retry_r, bool try_retry)
{
struct mail_storage *storage = STORAGE(uidlist->mbox->storage);
const char *line;
@@ -270,7 +271,7 @@
if (fstat(fd, &st) < 0) {
close_keep_errno(fd);
- if (errno == ESTALE) {
+ if (errno == ESTALE && try_retry) {
*retry_r = TRUE;
return -1;
}
@@ -334,8 +335,13 @@
uidlist->last_mtime = st.st_mtime;
} else {
/* I/O error */
- if (input->stream_errno == ESTALE)
- *retry_r = TRUE;
+ if (input->stream_errno == ESTALE && try_retry)
+ *retry_r = TRUE;
+ else {
+ errno = input->stream_errno;
+ mail_storage_set_critical(storage,
+ "read(%s) failed: %m", uidlist->fname);
+ }
}
i_stream_destroy(&input);
@@ -367,8 +373,9 @@
}
for (i = 0; ; i++) {
- ret = maildir_uidlist_update_read(uidlist, &retry);
- if (!retry || i == UIDLIST_ESTALE_RETRY_COUNT) {
+ ret = maildir_uidlist_update_read(uidlist, &retry,
+ i < UIDLIST_ESTALE_RETRY_COUNT);
+ if (!retry) {
if (ret >= 0)
uidlist->initial_read = TRUE;
break;
More information about the dovecot-cvs
mailing list