X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fdebug.c;h=312a0e1c80bf1422b0c55bca1a3673f890a11db2;hb=f597cd5067ed36508118d2ecd29338e7b81f47e4;hp=b030b7f292a4b779085d0218894cbb59393dff8f;hpb=7bb8900e1209a2abf3d83e7f06e2dfb314cef61e;p=bluesky.git diff --git a/bluesky/debug.c b/bluesky/debug.c index b030b7f..312a0e1 100644 --- a/bluesky/debug.c +++ b/bluesky/debug.c @@ -22,9 +22,9 @@ static void inode_dump(gpointer key, gpointer value, gpointer user_data) g_print("Inode %"PRIu64":\n", inode->inum); - gboolean locked = FALSE; + gboolean locked = TRUE; if (g_mutex_trylock(inode->lock)) { - locked = TRUE; + locked = FALSE; g_mutex_unlock(inode->lock); } g_print(" Locked: %c Refcount: %d\n", @@ -39,6 +39,9 @@ static void inode_dump(gpointer key, gpointer value, gpointer user_data) void bluesky_debug_dump(BlueSkyFS *fs) { g_print("*** DEBUG DUMP FOR FILESYSTEM %s ***\n", fs->name); + g_print("Cached blocks: %d\tDirty blocks: %d\n", + g_atomic_int_get(&fs->cache_total), + g_atomic_int_get(&fs->cache_dirty)); g_print("Cached inodes: %u\tNext inode: %"PRIu64"\n", g_hash_table_size(fs->inodes), fs->next_inum);