Skip to content

Commit 548d069

Browse files
committed
tools/ceph-bluestore-tool: optimize offline trim report info
Fixes: https://tracker.ceph.com/issues/67932 Signed-off-by: Yite Gu <[email protected]>
1 parent b8db14c commit 548d069

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/os/bluestore/BlueFS.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4817,11 +4817,16 @@ void BlueFS::trim_free_space(const string& type, std::ostream& outss)
48174817
outss << "device " << type << " is not configured";
48184818
return;
48194819
}
4820-
if (alloc[bdev_id] && !is_shared_alloc(bdev_id)) {
4820+
if (alloc[bdev_id]) {
48214821
if (!bdev[bdev_id]->is_discard_supported()) {
48224822
outss << "device " << type << " does not support trim";
48234823
return;
48244824
}
4825+
if (is_shared_alloc(bdev_id)) {
4826+
outss << "device " << type
4827+
<< " shares allocations with main device, trimming skipped.";
4828+
return;
4829+
}
48254830
alloc[bdev_id]->foreach(iterated_allocation);
48264831
outss << "device " << type << " trim done";
48274832
}

0 commit comments

Comments
 (0)