[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-uidlist.c, 1.28.2.14, 1.28.2.15
tss at dovecot.org
tss at dovecot.org
Sat Mar 10 22:58:45 EET 2007
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache-compress.c, 1.42.2.4, 1.42.2.5 mail-cache-transaction.c, 1.49.2.4, 1.49.2.5 mail-index-lock.c, 1.54.2.3, 1.54.2.4 mail-index-private.h, 1.69.2.5, 1.69.2.6 mail-index.c, 1.230.2.24, 1.230.2.25 mail-index.h, 1.158.2.4, 1.158.2.5
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-save.c, 1.70.2.6, 1.70.2.7 maildir-uidlist.c, 1.51.2.6, 1.51.2.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv3338/src/lib-storage/index/dbox
Modified Files:
Tag: branch_1_0
dbox-uidlist.c
Log Message:
Added fsync_disable setting.
Index: dbox-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-uidlist.c,v
retrieving revision 1.28.2.14
retrieving revision 1.28.2.15
diff -u -d -r1.28.2.14 -r1.28.2.15
--- dbox-uidlist.c 22 Feb 2007 13:39:12 -0000 1.28.2.14
+++ dbox-uidlist.c 10 Mar 2007 20:58:42 -0000 1.28.2.15
@@ -796,6 +796,7 @@
static int
dbox_uidlist_write_append_offsets(struct dbox_uidlist_append_ctx *ctx)
{
+ struct mail_storage *storage = STORAGE(ctx->uidlist->mbox->storage);
struct dbox_save_file *const *files;
struct dbox_file_header hdr;
unsigned int i, count;
@@ -803,6 +804,16 @@
files = array_get(&ctx->files, &count);
for (i = 0; i < count; i++) {
+ if (!ctx->uidlist->mbox->ibox.fsync_disable) {
+ if (fsync(files[i]->file->fd) < 0) {
+ mail_storage_set_critical(storage,
+ "fsync(%s) failed: %m",
+ files[i]->file->path);
+ ret = -1;
+ continue;
+ }
+ }
+
DEC2HEX(hdr.append_offset_hex,
files[i]->file->output->offset);
@@ -810,10 +821,9 @@
sizeof(hdr.append_offset_hex),
offsetof(struct dbox_file_header,
append_offset_hex)) < 0) {
- mail_storage_set_critical(
- STORAGE(ctx->uidlist->mbox->storage),
- "pwrite_full(%s) failed: %m",
- files[i]->file->path);
+ mail_storage_set_critical(storage,
+ "pwrite_full(%s) failed: %m",
+ files[i]->file->path);
ret = -1;
}
}
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache-compress.c, 1.42.2.4, 1.42.2.5 mail-cache-transaction.c, 1.49.2.4, 1.49.2.5 mail-index-lock.c, 1.54.2.3, 1.54.2.4 mail-index-private.h, 1.69.2.5, 1.69.2.6 mail-index.c, 1.230.2.24, 1.230.2.25 mail-index.h, 1.158.2.4, 1.158.2.5
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-save.c, 1.70.2.6, 1.70.2.7 maildir-uidlist.c, 1.51.2.6, 1.51.2.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list