Skip to content

Commit

Permalink
Merge pull request ceph#45021 from idryomov/wip-groupsnapns-operator-…
Browse files Browse the repository at this point in the history
…less

cls/rbd: GroupSnapshotNamespace comparator violates ordering rules

Reviewed-by: Mykola Golub <[email protected]>
Reviewed-by: Sunny Kumar <[email protected]>
  • Loading branch information
idryomov authored Feb 16, 2022
2 parents fd5f5f3 + 830e72a commit e1e9ee6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/cls/rbd/cls_rbd_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,14 +475,13 @@ struct GroupSnapshotNamespace {
}

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);
if (group_pool != gsn.group_pool) {
return group_pool < gsn.group_pool;
}
return false;
if (group_id != gsn.group_id) {
return group_id < gsn.group_id;
}
return group_snapshot_id < gsn.group_snapshot_id;
}
};

Expand Down

0 comments on commit e1e9ee6

Please sign in to comment.