mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 11:10:44 +00:00
Add a pile of tracing printks
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -696,6 +696,8 @@ int scoutfs_manifest_next_compact(struct super_block *sb, void *data)
|
||||
break;
|
||||
}
|
||||
|
||||
trace_printk("level %d\n", level);
|
||||
|
||||
if (level < 0) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
|
||||
@@ -97,6 +97,11 @@ void scoutfs_trans_write_func(struct work_struct *work)
|
||||
scoutfs_filerw_free_alloc(sb);
|
||||
#endif
|
||||
|
||||
trace_printk("dirty bytes %ld manifest dirty %d alloc dirty %d\n",
|
||||
scoutfs_item_dirty_bytes(sb),
|
||||
scoutfs_manifest_has_dirty(sb),
|
||||
scoutfs_alloc_has_dirty(sb));
|
||||
|
||||
/*
|
||||
* XXX this needs serious work to handle errors.
|
||||
*/
|
||||
@@ -184,6 +189,8 @@ int scoutfs_sync_fs(struct super_block *sb, int wait)
|
||||
struct write_attempt attempt;
|
||||
int ret;
|
||||
|
||||
trace_printk("wait %d\n", wait);
|
||||
|
||||
if (!wait) {
|
||||
queue_trans_work(sbi);
|
||||
return 0;
|
||||
|
||||
@@ -223,6 +223,8 @@ static void update_internal_aug(struct scoutfs_treap *treap,
|
||||
while (node) {
|
||||
bits = node_aug_bits(treap, node);
|
||||
ref = parent_ref(treap, node);
|
||||
trace_printk("node %p bits %x parent %p ref bits %x\n",
|
||||
node, bits, node->parent, ref->aug_bits);
|
||||
if (ref->aug_bits == bits)
|
||||
break;
|
||||
ref->aug_bits = bits;
|
||||
@@ -377,6 +379,9 @@ static void repair(struct scoutfs_treap *treap, struct treap_node *node)
|
||||
update_internal_aug(treap, node);
|
||||
update_data_aug(treap, node);
|
||||
rebalance(treap, node);
|
||||
|
||||
trace_printk("treap %p root aug %x\n",
|
||||
treap, treap->root_ref.aug_bits);
|
||||
}
|
||||
|
||||
static struct treap_node *alloc_node(u16 bytes)
|
||||
@@ -424,6 +429,9 @@ static bool mark_node_dirty(struct scoutfs_treap *treap, struct treap_ref *ref,
|
||||
if (dirty_node(treap, node))
|
||||
return false;
|
||||
|
||||
trace_printk("node %p off %llu gen %llu now dirty\n",
|
||||
node, node->off, node->gen);
|
||||
|
||||
treap->dirty_bytes += node_ring_bytes(node);
|
||||
treap->dirty = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user