Add some details for debug prints
parent
cf54741c95
commit
564d64e271
|
@ -783,6 +783,9 @@ void journal_flusher_co::update_clean_db()
|
||||||
{
|
{
|
||||||
auto clean_it = bs->clean_db.find(cur.oid);
|
auto clean_it = bs->clean_db.find(cur.oid);
|
||||||
bs->clean_db.erase(clean_it);
|
bs->clean_db.erase(clean_it);
|
||||||
|
#ifdef BLOCKSTORE_DEBUG
|
||||||
|
printf("Free block %lu (delete)\n", clean_loc >> bs->block_order);
|
||||||
|
#endif
|
||||||
bs->data_alloc->set(clean_loc >> bs->block_order, false);
|
bs->data_alloc->set(clean_loc >> bs->block_order, false);
|
||||||
clean_loc = UINT64_MAX;
|
clean_loc = UINT64_MAX;
|
||||||
}
|
}
|
||||||
|
|
|
@ -625,7 +625,11 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u
|
||||||
.journal_sector = proc_pos,
|
.journal_sector = proc_pos,
|
||||||
});
|
});
|
||||||
#ifdef BLOCKSTORE_DEBUG
|
#ifdef BLOCKSTORE_DEBUG
|
||||||
printf("Allocate block %lu\n", je->big_write.location >> bs->block_order);
|
printf(
|
||||||
|
"Allocate block (journal) %lu: %lx:%lx v%lu\n",
|
||||||
|
je->big_write.location >> bs->block_order,
|
||||||
|
ov.oid.inode, ov.oid.stripe, ov.version
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
bs->data_alloc->set(je->big_write.location >> bs->block_order, true);
|
bs->data_alloc->set(je->big_write.location >> bs->block_order, true);
|
||||||
bs->journal.used_sectors[proc_pos]++;
|
bs->journal.used_sectors[proc_pos]++;
|
||||||
|
|
|
@ -224,7 +224,10 @@ int blockstore_impl_t::dequeue_write(blockstore_op_t *op)
|
||||||
dirty_it->second.location = loc << block_order;
|
dirty_it->second.location = loc << block_order;
|
||||||
dirty_it->second.state = (dirty_it->second.state & ~BS_ST_WORKFLOW_MASK) | BS_ST_SUBMITTED;
|
dirty_it->second.state = (dirty_it->second.state & ~BS_ST_WORKFLOW_MASK) | BS_ST_SUBMITTED;
|
||||||
#ifdef BLOCKSTORE_DEBUG
|
#ifdef BLOCKSTORE_DEBUG
|
||||||
printf("Allocate block %lu\n", loc);
|
printf(
|
||||||
|
"Allocate block %lu for %lx:%lx v%lu\n",
|
||||||
|
loc, op->oid.inode, op->oid.stripe, op->version
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
data_alloc->set(loc, true);
|
data_alloc->set(loc, true);
|
||||||
uint64_t stripe_offset = (op->offset % bitmap_granularity);
|
uint64_t stripe_offset = (op->offset % bitmap_granularity);
|
||||||
|
|
Loading…
Reference in New Issue