Fix some logging
parent
2d4e24c9ce
commit
41dddddbf2
|
@ -331,7 +331,7 @@ resume_1:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
clean_disk_entry *new_entry = (clean_disk_entry*)(meta_new.buf + meta_new.pos*bs->clean_entry_size);
|
clean_disk_entry *new_entry = (clean_disk_entry*)(meta_new.buf + meta_new.pos*bs->clean_entry_size);
|
||||||
assert(new_entry->oid.inode == 0);
|
assert(new_entry->oid.inode == 0 || new_entry->oid == cur.oid);
|
||||||
new_entry->oid = cur.oid;
|
new_entry->oid = cur.oid;
|
||||||
new_entry->version = cur.version;
|
new_entry->version = cur.version;
|
||||||
if (!bs->inmemory_meta)
|
if (!bs->inmemory_meta)
|
||||||
|
|
|
@ -148,7 +148,7 @@ bool journal_t::trim()
|
||||||
auto journal_used_it = used_sectors.lower_bound(used_start);
|
auto journal_used_it = used_sectors.lower_bound(used_start);
|
||||||
#ifdef BLOCKSTORE_DEBUG
|
#ifdef BLOCKSTORE_DEBUG
|
||||||
printf(
|
printf(
|
||||||
"Trimming journal (used_start=%lu, next_free=%lu, first_used=%lu, usage_count=%lu)\n",
|
"Trimming journal (used_start=%08lx, next_free=%08lx, first_used=%08lx, usage_count=%08lx)\n",
|
||||||
used_start, next_free,
|
used_start, next_free,
|
||||||
journal_used_it == used_sectors.end() ? 0 : journal_used_it->first,
|
journal_used_it == used_sectors.end() ? 0 : journal_used_it->first,
|
||||||
journal_used_it == used_sectors.end() ? 0 : journal_used_it->second
|
journal_used_it == used_sectors.end() ? 0 : journal_used_it->second
|
||||||
|
@ -180,7 +180,7 @@ bool journal_t::trim()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef BLOCKSTORE_DEBUG
|
#ifdef BLOCKSTORE_DEBUG
|
||||||
printf("Journal trimmed to %lu (next_free=%lu)\n", used_start, next_free);
|
printf("Journal trimmed to %08lx (next_free=%08lx)\n", used_start, next_free);
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,10 @@ bool blockstore_impl_t::enqueue_write(blockstore_op_t *op)
|
||||||
}
|
}
|
||||||
// Immediately add the operation into dirty_db, so subsequent reads could see it
|
// Immediately add the operation into dirty_db, so subsequent reads could see it
|
||||||
#ifdef BLOCKSTORE_DEBUG
|
#ifdef BLOCKSTORE_DEBUG
|
||||||
printf("%s %lu:%lu v%lu\n", is_del ? "Delete" : "Write", op->oid.inode, op->oid.stripe, op->version);
|
if (is_del)
|
||||||
|
printf("Delete %lu:%lu v%lu\n", op->oid.inode, op->oid.stripe, op->version);
|
||||||
|
else
|
||||||
|
printf("Write %lu:%lu v%lu offset=%u len=%u\n", op->oid.inode, op->oid.stripe, op->version, op->offset, op->len);
|
||||||
#endif
|
#endif
|
||||||
dirty_db.emplace((obj_ver_id){
|
dirty_db.emplace((obj_ver_id){
|
||||||
.oid = op->oid,
|
.oid = op->oid,
|
||||||
|
|
|
@ -76,7 +76,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("offset %08lx: no magic in the beginning, looks like random data\n", self.journal_pos);
|
printf("offset %08lx: no magic in the beginning, looks like random data (pattern=%lx)\n", self.journal_pos, *((uint64_t*)data));
|
||||||
self.journal_pos += self.journal_block;
|
self.journal_pos += self.journal_block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue