dovecot-2.2: dbox: Reverted recent fstat() avoidance change. It ...
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 20 03:26:28 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/58732d172107
changeset: 14356:58732d172107
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 16 18:45:50 2012 +0200
description:
dbox: Reverted recent fstat() avoidance change. It didn't do that, just broke mdbox.
diffstat:
src/lib-storage/index/dbox-common/dbox-file.c | 2 +-
src/lib-storage/index/dbox-common/dbox-file.h | 1 -
src/lib-storage/index/dbox-multi/mdbox-file.c | 1 -
src/lib-storage/index/dbox-single/sdbox-file.c | 1 -
4 files changed, 1 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 5b05411a81cf -r 58732d172107 src/lib-storage/index/dbox-common/dbox-file.c
--- a/src/lib-storage/index/dbox-common/dbox-file.c Thu Mar 15 18:24:15 2012 +0200
+++ b/src/lib-storage/index/dbox-common/dbox-file.c Fri Mar 16 18:45:50 2012 +0200
@@ -588,7 +588,7 @@
return 0;
}
- if (ctx->output->offset == 0 && !file->created) {
+ if (ctx->output->offset == 0) {
/* first append to existing file. seek to eof first. */
if (fstat(file->fd, &st) < 0) {
dbox_file_set_syscall_error(file, "fstat()");
diff -r 5b05411a81cf -r 58732d172107 src/lib-storage/index/dbox-common/dbox-file.h
--- a/src/lib-storage/index/dbox-common/dbox-file.h Thu Mar 15 18:24:15 2012 +0200
+++ b/src/lib-storage/index/dbox-common/dbox-file.h Fri Mar 16 18:45:50 2012 +0200
@@ -116,7 +116,6 @@
ARRAY_DEFINE(metadata, const char *);
uoff_t metadata_read_offset;
- unsigned int created:1; /* this file is now being created */
unsigned int appending:1;
unsigned int deleted:1;
unsigned int corrupted:1;
diff -r 5b05411a81cf -r 58732d172107 src/lib-storage/index/dbox-multi/mdbox-file.c
--- a/src/lib-storage/index/dbox-multi/mdbox-file.c Thu Mar 15 18:24:15 2012 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-file.c Fri Mar 16 18:45:50 2012 +0200
@@ -106,7 +106,6 @@
bool create_parents;
int ret;
- _file->created = TRUE;
create_parents = dbox_file_is_in_alt(_file);
_file->fd = _file->storage->v.
file_create_fd(_file, _file->cur_path, create_parents);
diff -r 5b05411a81cf -r 58732d172107 src/lib-storage/index/dbox-single/sdbox-file.c
--- a/src/lib-storage/index/dbox-single/sdbox-file.c Thu Mar 15 18:24:15 2012 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-file.c Fri Mar 16 18:45:50 2012 +0200
@@ -60,7 +60,6 @@
struct dbox_file *file;
file = sdbox_file_init(mbox, 0);
- file->created = TRUE;
file->fd = file->storage->v.
file_create_fd(file, file->primary_path, FALSE);
return file;
More information about the dovecot-cvs
mailing list