X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Flog.c;h=99b5ae59c528d846bc7ede95d0e3ee37a6a3ac53;hb=4bd76c48487520c2b1c08ff67009f752e0bde941;hp=c45ffc8c9336606c8fbe46f071c639620f34fca5;hpb=4a207da5eef9f87a702a011d003d5ad17b651085;p=bluesky.git diff --git a/bluesky/log.c b/bluesky/log.c index c45ffc8..99b5ae5 100644 --- a/bluesky/log.c +++ b/bluesky/log.c @@ -204,6 +204,14 @@ static gpointer log_thread(gpointer d) offset += sizeof(header) + sizeof(footer) + item->data->len; + /* Replace the log item's string data with a memory-mapped copy of the + * data, now that it has been written to the log file. (Even if it + * isn't yet on disk, it should at least be in the page cache and so + * available to memory map.) */ + bluesky_string_unref(item->data); + item->data = NULL; + bluesky_cloudlog_fetch(item); + log->committed = g_slist_prepend(log->committed, item); g_atomic_int_add(&item->data_lock_count, -1); g_mutex_unlock(item->lock);