Work to unify the cloud segment writing with other cache management.
[bluesky.git] / bluesky / debug.c
index 19cc5ef..6242ba6 100644 (file)
@@ -31,8 +31,9 @@ static void inode_dump(gpointer key, gpointer value, gpointer user_data)
             locked ? 'T' : 'F', inode->refcount);
 
     g_print("    Type: %d   Mode: %o\n", inode->type, inode->mode);
-    g_print("    change_count = %"PRIu64", change_commit = %"PRIu64"\n",
-            inode->change_count, inode->change_commit);
+    g_print("    change_count = %"PRIu64", change_commit = %"PRIu64", "
+            "change_cloud = %"PRIu64"\n",
+            inode->change_count, inode->change_commit, inode->change_cloud);
 }
 
 static void cloudlog_dump(gpointer key, gpointer value, gpointer user_data)
@@ -42,8 +43,10 @@ static void cloudlog_dump(gpointer key, gpointer value, gpointer user_data)
     for (int i = 0; i < sizeof(BlueSkyCloudID); i++) {
         g_print("%02x", (uint8_t)(log->id.bytes[i]));
     }
-    g_print(": ty=%d inode=%"PRIu64" locs=%x log@(%d,%d) cloud@(%d,%d,%d)\n",
-            log->type, log->inum, log->location_flags,
+    g_print(": refs=%d ty=%d inode=%"PRIu64" locs=%x log@(%d,%d) cloud@(%d,%d,%d)\n",
+            log->refcount,
+            log->type, log->inum,
+            log->location_flags | (log->data != NULL ? 0x100 : 0),
             log->log_seq, log->log_offset, log->location.directory,
             log->location.sequence, log->location.offset);
 }