[dovecot-cvs] dovecot/src/lib-index mail-index-private.h, 1.66,
1.67 mail-index.c, 1.225, 1.226 mail-transaction-log.c, 1.108, 1.109
cras at dovecot.org
cras at dovecot.org
Sun Feb 26 12:15:43 EET 2006
- Previous message: [dovecot-cvs] dovecot/src/lib Makefile.am, 1.60,
1.61 nfs-workarounds.c, NONE, 1.1 nfs-workarounds.h, NONE,
1.1 safe-open.c, 1.1, NONE safe-open.h, 1.1, NONE
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir
maildir-uidlist.c, 1.46, 1.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv9314/lib-index
Modified Files:
mail-index-private.h mail-index.c mail-transaction-log.c
Log Message:
Renamed safe-open.* to nfs-workarounds.*, safe_open() to nfs_safe_open() and
added a new global NFS_ESTALE_RETRY_COUNT which everyone uses instead of
defining their own.
Index: mail-index-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-private.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- mail-index-private.h 16 Feb 2006 15:23:03 -0000 1.66
+++ mail-index-private.h 26 Feb 2006 10:15:41 -0000 1.67
@@ -18,7 +18,7 @@
/* How many times to retry opening index files if read/fstat returns ESTALE.
This happens with NFS when the file has been deleted (ie. index file was
rewritten by another computer than us). */
-#define MAIL_INDEX_ESTALE_RETRY_COUNT 10
+#define MAIL_INDEX_ESTALE_RETRY_COUNT NFS_ESTALE_RETRY_COUNT
#define MAIL_INDEX_IS_IN_MEMORY(index) \
((index)->dir == NULL)
Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -d -r1.225 -r1.226
--- mail-index.c 25 Feb 2006 10:19:18 -0000 1.225
+++ mail-index.c 26 Feb 2006 10:15:41 -0000 1.226
@@ -5,7 +5,7 @@
#include "buffer.h"
#include "hash.h"
#include "mmap-util.h"
-#include "safe-open.h"
+#include "nfs-workarounds.h"
#include "read-full.h"
#include "write-full.h"
#include "mail-index-private.h"
@@ -1194,7 +1194,7 @@
/* Note that our caller must close index->fd by itself.
mail_index_reopen() for example wants to revert back to old
index file if opening the new one fails. */
- index->fd = safe_open(index->filepath, O_RDWR);
+ index->fd = nfs_safe_open(index->filepath, O_RDWR);
index->readonly = FALSE;
if (index->fd == -1 && errno == EACCES) {
Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- mail-transaction-log.c 16 Feb 2006 15:23:03 -0000 1.108
+++ mail-transaction-log.c 26 Feb 2006 10:15:41 -0000 1.109
@@ -4,7 +4,7 @@
#include "ioloop.h"
#include "buffer.h"
#include "file-dotlock.h"
-#include "safe-open.h"
+#include "nfs-workarounds.h"
#include "close-keep-errno.h"
#include "read-full.h"
#include "write-full.h"
@@ -497,7 +497,7 @@
bool found;
/* log creation is locked now - see if someone already created it */
- old_fd = safe_open(path, O_RDWR);
+ old_fd = nfs_safe_open(path, O_RDWR);
if (old_fd != -1) {
if ((ret = fstat(old_fd, &st)) < 0) {
mail_index_file_set_syscall_error(index, path,
@@ -773,7 +773,7 @@
return mail_transaction_log_file_alloc_in_memory(log);
for (i = 0; ; i++) {
- fd = safe_open(path, O_RDWR);
+ fd = nfs_safe_open(path, O_RDWR);
if (fd == -1) {
if (errno != ENOENT) {
mail_index_file_set_syscall_error(log->index,
@@ -808,7 +808,7 @@
int fd, ret;
for (i = 0;; i++) {
- fd = safe_open(path, O_RDWR);
+ fd = nfs_safe_open(path, O_RDWR);
if (fd == -1) {
mail_index_file_set_syscall_error(log->index, path,
"open()");
@@ -978,7 +978,7 @@
/* see if we have it in log.2 file */
path = t_strconcat(log->index->filepath,
MAIL_TRANSACTION_LOG_SUFFIX".2", NULL);
- fd = safe_open(path, O_RDWR);
+ fd = nfs_safe_open(path, O_RDWR);
if (fd == -1) {
if (errno == ENOENT)
return 0;
- Previous message: [dovecot-cvs] dovecot/src/lib Makefile.am, 1.60,
1.61 nfs-workarounds.c, NONE, 1.1 nfs-workarounds.h, NONE,
1.1 safe-open.c, 1.1, NONE safe-open.h, 1.1, NONE
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir
maildir-uidlist.c, 1.46, 1.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list