Skip to content

Commit eb01854

Browse files
authored
Merge pull request ceph#59633 from YiteGu/optimize-offline-trim-report-info
tools/ceph-bluestore-tool: optimize offline trim report info
2 parents d0d4b60 + 548d069 commit eb01854

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
@@ -4867,11 +4867,16 @@ void BlueFS::trim_free_space(const string& type, std::ostream& outss)
48674867
outss << "device " << type << " is not configured";
48684868
return;
48694869
}
4870-
if (alloc[bdev_id] && !is_shared_alloc(bdev_id)) {
4870+
if (alloc[bdev_id]) {
48714871
if (!bdev[bdev_id]->is_discard_supported()) {
48724872
outss << "device " << type << " does not support trim";
48734873
return;
48744874
}
4875+
if (is_shared_alloc(bdev_id)) {
4876+
outss << "device " << type
4877+
<< " shares allocations with main device, trimming skipped.";
4878+
return;
4879+
}
48754880
alloc[bdev_id]->foreach(iterated_allocation);
48764881
outss << "device " << type << " trim done";
48774882
}

0 commit comments

Comments
 (0)