uint64_t current = log_writer->file->fnode.size;
uint64_t expected = _estimate_log_size();
float ratio = (float)current / (float)expected;
- dout(10) << __func__ << " current " << current
- << " expected " << expected
+ dout(10) << __func__ << " current 0x" << std::hex << current
+ << " expected " << expected << std::dec
<< " ratio " << ratio << dendl;
if (current < g_conf->bluefs_log_compact_min_size ||
ratio < g_conf->bluefs_log_compact_min_ratio)
{
uint64_t partial = bl.length() % super.block_size;
if (partial) {
- dout(10) << __func__ << " padding with " << super.block_size - partial
- << " zeros" << dendl;
+ dout(10) << __func__ << " padding with 0x" << std::hex
+ << super.block_size - partial << " zeros" << std::dec << dendl;
bl.append_zero(super.block_size - partial);
}
}
// allocate some more space (before we run out)?
uint64_t runway = log_writer->file->fnode.get_allocated() - log_writer->pos;
if (runway < g_conf->bluefs_min_log_runway) {
- dout(10) << __func__ << " allocating more log runway ("
- << runway << " remaining" << dendl;
+ dout(10) << __func__ << " allocating more log runway (0x"
+ << std::hex << runway << std::dec << " remaining)" << dendl;
int r = _allocate(log_writer->file->fnode.prefer_bdev,
g_conf->bluefs_max_log_runway,
&log_writer->file->fnode.extents);
int BlueFS::_allocate(uint8_t id, uint64_t len, vector<bluefs_extent_t> *ev)
{
dout(10) << __func__ << " len 0x" << std::hex << len << std::dec
- << " from " << id << dendl;
+ << " from " << (int)id << dendl;
assert(id < alloc.size());
uint64_t min_alloc_size = g_conf->bluefs_alloc_size;
if (r < 0) {
if (id != BDEV_SLOW) {
if (bdev[id])
- derr << __func__ << " failed to allocate " << left << " on bdev " << id
- << ", free " << alloc[id]->get_free()
- << "; fallback to bdev " << id + 1 << dendl;
+ derr << __func__ << " failed to allocate 0x" << std::hex << left
+ << " on bdev " << (int)id
+ << ", free 0x" << alloc[id]->get_free()
+ << "; fallback to bdev " << (int)id + 1
+ << std::dec << dendl;
return _allocate(id + 1, len, ev);
}
if (bdev[id])
- derr << __func__ << " failed to allocate " << left << " on bdev " << id
- << ", free " << alloc[id]->get_free() << dendl;
+ derr << __func__ << " failed to allocate 0x" << std::hex << left
+ << " on bdev " << (int)id
+ << ", free 0x" << alloc[id]->get_free() << std::dec << dendl;
else
- derr << __func__ << " failed to allocate " << left << " on bdev " << id
- << ", dne" << dendl;
+ derr << __func__ << " failed to allocate 0x" << std::hex << left
+ << " on bdev " << (int)id << ", dne" << std::dec << dendl;
return r;
}
ostream& operator<<(ostream& out, bluefs_extent_t e)
{
- return out << (int)e.bdev << ":" << e.offset << "+" << e.length;
+ return out << (int)e.bdev << ":0x" << std::hex << e.offset << "+" << e.length
+ << std::dec;
}
// bluefs_super_t
return out << "super(uuid " << s.uuid
<< " osd " << s.osd_uuid
<< " v " << s.version
- << " block_size " << s.block_size
- << " log_fnode " << s.log_fnode
- << ")";
+ << " block_size 0x" << std::hex << s.block_size
+ << " log_fnode 0x" << s.log_fnode
+ << std::dec << ")";
}
// bluefs_fnode_t
ostream& operator<<(ostream& out, const bluefs_fnode_t& file)
{
return out << "file(ino " << file.ino
- << " size " << file.size
+ << " size 0x" << std::hex << file.size << std::dec
<< " mtime " << file.mtime
<< " bdev " << (int)file.prefer_bdev
<< " extents " << file.extents
ostream& operator<<(ostream& out, const bluefs_transaction_t& t)
{
return out << "txn(seq " << t.seq
- << " len " << t.op_bl.length()
- << " crc " << t.op_bl.crc32c(-1)
- << ")";
+ << " len 0x" << std::hex << t.op_bl.length()
+ << " crc 0x" << t.op_bl.crc32c(-1)
+ << std::dec << ")";
}