]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/rbd: GroupSnapshotNamespace comparator violates ordering rules 45075/head
authorIlya Dryomov <idryomov@gmail.com>
Mon, 14 Feb 2022 12:04:00 +0000 (13:04 +0100)
committerChristopher Hoffman <choffman@redhat.com>
Thu, 17 Feb 2022 14:50:42 +0000 (14:50 +0000)
commit11e958ea9981cbde4b422857640f16bbb1e23d31
treeb307c12820fe9d7ddd03f0059f10e314e96af237
parent451eee2557659c56b0280863fb8e23da5a753de9
cls/rbd: GroupSnapshotNamespace comparator violates ordering rules

For

  GroupSnapshotNamespace a(1, "group-1", "snap-2");
  GroupSnapshotNamespace b(1, "group-2", "snap-1");

both a < b and b < a evaluate to true.  This violates STL strict weak
ordering requirements which is a problem because GroupSnapshotNamespace
is used as a key in std::map (ictx->snap_ids at least), etc.

Fixes: https://tracker.ceph.com/issues/49792
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 830e72ab9d66c8f5703ea27da5249b02dd16ccd0)
src/cls/rbd/cls_rbd_types.h