Skip to content

Commit fa94666

Browse files
committed
os/bluestore: better reporting space usage in BlueFS
Signed-off-by: Igor Fedotov <[email protected]>
1 parent 950249e commit fa94666

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

src/os/bluestore/BlueFS.cc

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -685,12 +685,25 @@ void BlueFS::dump_block_extents(ostream& out)
685685
}
686686
auto total = get_block_device_size(i);
687687
auto free = get_free(i);
688-
689-
out << i << " : device size 0x" << std::hex << total
690-
<< "(" << byte_u_t(total) << ")"
691-
<< " : using 0x" << total - free
692-
<< "(" << byte_u_t(total - free) << ")"
693-
<< std::dec << std::endl;
688+
if (i != shared_alloc_id) {
689+
out << i << " : device size 0x" << std::hex << total
690+
<< "(" << byte_u_t(total) << ")"
691+
<< " : using 0x" << total - free
692+
<< "(" << byte_u_t(total - free) << ")"
693+
<< std::dec << std::endl;
694+
} else {
695+
auto bluefs_used = get_used(i);
696+
auto non_bluefs_used = get_used_non_bluefs();
697+
out << i << " : device size 0x" << std::hex << total
698+
<< "(" << byte_u_t(total) << ")"
699+
<< " : using 0x" << total - free
700+
<< "(" << byte_u_t(total - free) << ")"
701+
<< " : bluefs used 0x" << bluefs_used
702+
<< "(" << byte_u_t(bluefs_used) << ")"
703+
<< " : non-bluefs used 0x" << non_bluefs_used
704+
<< "(" << byte_u_t(non_bluefs_used) << ")"
705+
<< std::dec << std::endl;
706+
}
694707
}
695708
}
696709

@@ -5367,10 +5380,7 @@ void OriginalVolumeSelector::get_paths(const std::string& base, paths& res) cons
53675380
#define dout_prefix *_dout << "OriginalVolumeSelector: "
53685381

53695382
void OriginalVolumeSelector::dump(ostream& sout) {
5370-
sout<< "wal_total:" << wal_total
5371-
<< ", db_total:" << db_total
5372-
<< ", slow_total:" << slow_total
5373-
<< std::endl;
5383+
sout << "*** no stats ***" << std::endl;
53745384
}
53755385

53765386
// ===============================================

0 commit comments

Comments
 (0)