X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Flog.c;h=5fd6e284c09793a4551bc196bba9a59bab2ccbed;hb=9b1a8397b18ba54e6ad6cc306e1baaecda6fe1fe;hp=a904fe1beff88f44f78133a48a9a2a4aa6b8edf6;hpb=ef355dcfecf0dad2d95ff5fb3d847f1bf8b9ebe5;p=bluesky.git diff --git a/bluesky/log.c b/bluesky/log.c index a904fe1..5fd6e28 100644 --- a/bluesky/log.c +++ b/bluesky/log.c @@ -217,15 +217,6 @@ static gpointer log_thread(gpointer d) offset += sizeof(header) + sizeof(footer) + item->data->len; - /* Since we have just written a new dirty object to the journal, - * increment the count of live dirty objects in that journal file. The - * count will be decremented when objects are deleted or written to the - * cloud. */ - if (!(item->location_flags & CLOUDLOG_CLOUD)) { - g_atomic_int_add(&log->current_log->dirty_refs, 1); - item->dirty_journal = log->current_log; - } - /* 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 @@ -522,17 +513,16 @@ void bluesky_cachefile_gc(BlueSkyFS *fs) * then we'll just skip the file on this pass. */ if (g_mutex_trylock(cachefile->lock)) { int64_t age = bluesky_get_current_time() - cachefile->atime; - g_print("%s addr=%p mapcount=%d refcount=%d dirty=%d atime_age=%f", + g_print("%s addr=%p mapcount=%d refcount=%d atime_age=%f", cachefile->filename, cachefile->addr, cachefile->mapcount, - cachefile->refcount, cachefile->dirty_refs, age / 1e6); + cachefile->refcount, age / 1e6); if (cachefile->fetching) g_print(" (fetching)"); g_print("\n"); if (g_atomic_int_get(&fs->log->disk_used) > DISK_CACHE_SIZE_TARGET && g_atomic_int_get(&cachefile->refcount) == 0 - && g_atomic_int_get(&cachefile->mapcount) == 0 - && g_atomic_int_get(&cachefile->dirty_refs) == 0) + && g_atomic_int_get(&cachefile->mapcount) == 0) { g_print(" ...deleting\n"); if (unlinkat(fs->log->dirfd, cachefile->filename, 0) < 0) {