]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
src/: remove all direct comparisons to get_max() 9614/head
authorSamuel Just <sjust@redhat.com>
Fri, 3 Jun 2016 00:13:09 +0000 (17:13 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 6 Jun 2016 16:36:54 +0000 (09:36 -0700)
commita32820d15fd5d2f817bc5fc94b731f4e7adafbf3
tree23318ce8ca1ee9a72c08a014513cdf8931c16311
parentf869594332fb8ffa4d29aae22573afd094c39f54
src/: remove all direct comparisons to get_max()

get_max() now returns a special singleton type from which hobject_t's
can be assigned and constructed, but which cannot be directly compared.

This patch also cleans up all such uses to use is_max() instead.

This should prevent some issues like 16113 by preventing us from
checking for max-ness by comparing against a sentinel value.  The more
complete fix will be to make all fields of hobject_t private and enforce
a canonical max() representation that way.  That patch will be hard to
backport, however, so we'll settle for this for now.

Fixes: http://tracker.ceph.com/issues/16113
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 7c5f2acaa57bd6caaf4b13b48154df3ad6fbe84d)
src/common/hobject.h
src/os/bluestore/BlueStore.cc
src/osd/PG.cc
src/osd/PG.h
src/osd/ReplicatedPG.cc
src/osd/osd_types.cc