Actions
Bug #49792
closedlibrbd: bug in GroupSnapshotNamespace operator<
% Done:
0%
Source:
Tags:
Backport:
octopus,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Description
inline bool operator<(const GroupSnapshotNamespace& gsn) const {
if (group_pool < gsn.group_pool) {
return true;
} else if (group_id < gsn.group_id) {
return true;
} else {
return (group_snapshot_id < gsn.group_snapshot_id);
}
return false;
}
Suppose we got these data:
GroupSnapshotNamespace a(1,"28ae679ce9e8", "955628992537");
GroupSnapshotNamespace b(1,"28ae8436ec3", "1026a31ac3c44");
In this case, a < b is true, b < a is also true.
If a map uses GroupSnapshotNamespace as key, this might cause an unexcepted result in map.find() or map.count().
Updated by Ilya Dryomov about 2 years ago
- Status changed from New to In Progress
- Assignee set to Ilya Dryomov
- Backport set to octopus,pacific
Updated by Ilya Dryomov about 2 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 45021
Updated by Ilya Dryomov about 2 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot about 2 years ago
- Copied to Backport #54297: octopus: librbd: bug in GroupSnapshotNamespace operator< added
Updated by Backport Bot about 2 years ago
- Copied to Backport #54298: pacific: librbd: bug in GroupSnapshotNamespace operator< added
Updated by Ilya Dryomov almost 2 years ago
- Status changed from Pending Backport to Resolved
Actions