From 99c45bb5ed905283abf95d9ee84edb80650f5469 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 24 Oct 2020 00:56:38 +0300 Subject: [PATCH] Fix debugging output during journal loading --- blockstore_init.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blockstore_init.cpp b/blockstore_init.cpp index c42068d7..3d061628 100644 --- a/blockstore_init.cpp +++ b/blockstore_init.cpp @@ -558,7 +558,7 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u { #ifdef BLOCKSTORE_DEBUG printf( - "je_big_write%s oid=%lx:%lx ver=%lu loc=%lu\n", + "je_big_write%s oid=%lx:%lx ver=%lu loc=%08lx\n", je->type == JE_BIG_WRITE_INSTANT ? "_instant" : "", je->big_write.oid.inode, je->big_write.oid.stripe, je->big_write.version, je->big_write.location ); @@ -585,6 +585,12 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u #endif bs->data_alloc->set(je->big_write.location >> bs->block_order, true); bs->journal.used_sectors[proc_pos]++; +#ifdef BLOCKSTORE_DEBUG + printf( + "journal offset %08lx is used by %lx:%lx v%lu (%lu refs)\n", + proc_pos, ov.oid.inode, ov.oid.stripe, ov.version, bs->journal.used_sectors[proc_pos] + ); +#endif auto & unstab = bs->unstable_writes[ov.oid]; unstab = unstab < ov.version ? ov.version : unstab; if (je->type == JE_BIG_WRITE_INSTANT)