Minor bugfixes/tweaks.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Mon, 16 Aug 2010 22:13:53 +0000 (15:13 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Mon, 16 Aug 2010 22:13:53 +0000 (15:13 -0700)
bluesky/cloudlog.c
bluesky/log.c
bluesky/util.c

index 0c3fb02..3809b00 100644 (file)
@@ -288,7 +288,7 @@ void bluesky_cloudlog_flush(BlueSkyFS *fs)
                                  state->location.sequence);
     async->data = bluesky_string_new_from_gstring(state->data);
     bluesky_store_async_submit(async);
-    bluesky_store_async_wait(async);
+    //bluesky_store_async_wait(async);
     bluesky_store_async_unref(async);
 
     state->location.sequence++;
index 48f662b..bdf14ff 100644 (file)
@@ -104,7 +104,7 @@ static gboolean log_open(BlueSkyLog *log)
     }
 
     while (log->fd < 0) {
-        g_snprintf(logname, sizeof(logname), "log-%08d", log->seq_num);
+        g_snprintf(logname, sizeof(logname), "journal-%08d", log->seq_num);
         log->fd = openat(log->dirfd, logname, O_CREAT|O_WRONLY|O_EXCL, 0600);
         if (log->fd < 0 && errno == EEXIST) {
             fprintf(stderr, "Log file %s already exists...\n", logname);
@@ -317,7 +317,7 @@ BlueSkyCacheFile *bluesky_cachefile_lookup(BlueSkyFS *fs,
 
         // A request for a local log file
         if (clouddir < 0) {
-            logname = g_strdup_printf("log-%08d", log_seq);
+            logname = g_strdup_printf("journal-%08d", log_seq);
         } else {
             logname = g_strdup_printf("log-%08d-%08d", clouddir, log_seq);
         }
index 0d24328..427519c 100644 (file)
@@ -78,7 +78,7 @@ BlueSkyRCStr *bluesky_string_new_from_gstring(GString *s)
 BlueSkyRCStr *bluesky_string_new_from_mmap(BlueSkyCacheFile *mmap,
                                            int offset, gsize len)
 {
-    g_assert(offset + len < mmap->len);
+    g_assert(offset + len <= mmap->len);
 
     BlueSkyRCStr *string = g_new(BlueSkyRCStr, 1);
     string->mmap = mmap;