From cdf9e6aec9519d125ed90fa2d8fafc948addb81c Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 11 Nov 2009 10:05:56 +0000 Subject: [PATCH] Increased stdio flush interval from 1 MB to 16 MB --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/write.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index b2171aa6..a6f3748c 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.11.10.203412" +#define Cdrskin_timestamP "2009.11.11.100714" diff --git a/libburn/trunk/libburn/write.c b/libburn/trunk/libburn/write.c index a8599178..c9a4eda7 100644 --- a/libburn/trunk/libburn/write.c +++ b/libburn/trunk/libburn/write.c @@ -2040,6 +2040,8 @@ int burn_stdio_slowdown(struct burn_drive *d, struct timeval *prev_time, return 1; } +/* Flush write buffer after each 16 MB */ +#define Libburn_stdio_flush_limiT 8192 /* ts A70904 */ int burn_stdio_write_track(struct burn_write_opts *o, struct burn_session *s, @@ -2078,8 +2080,9 @@ int burn_stdio_write_track(struct burn_write_opts *o, struct burn_session *s, break; } d->progress.sector++; - /* Flush to disk after each full MB */ - if (d->progress.sector - prev_sync_sector >= 512) { + /* Flush to disk from time to time */ + if (d->progress.sector - prev_sync_sector >= + Libburn_stdio_flush_limiT) { prev_sync_sector = d->progress.sector; if (!o->simulate) burn_stdio_sync_cache(d->stdio_fd, d, 1);