Add very rudimentary eviction data blocks from the cache.
[bluesky.git] / bluesky / inode.c
index 30974ca..55781ca 100644 (file)
@@ -92,6 +92,7 @@ BlueSkyFS *bluesky_init_fs(gchar *name, BlueSkyStore *store)
             fs->name = g_strdup(name);
             return fs;
         }
+        bluesky_string_unref(data);
     }
 
     g_print("Initializing fresh filesystem\n");
@@ -196,6 +197,10 @@ BlueSkyInode *bluesky_get_inode(BlueSkyFS *fs, uint64_t inum)
 
     if (inode != NULL) {
         bluesky_inode_ref(inode);
+
+        /* FIXME: We assume we can atomically update the in-memory access time
+         * without a lock. */
+        inode->access_time = bluesky_get_current_time();
     }
 
     g_mutex_unlock(fs->lock);