]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/PGMap: let pg_string_state() return boost::optional<>
authorKefu Chai <kchai@redhat.com>
Tue, 10 Oct 2017 12:32:08 +0000 (20:32 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 11 Oct 2017 03:14:55 +0000 (11:14 +0800)
commit51c6f0def379ba013a82204398a021663f1b5d56
tree84b9925019f383bd7c75b1bcd3dad2493d16d975
parenta33dd01164bb18b24a0909c9419e15fcd2e79446
mon/PGMap: let pg_string_state() return boost::optional<>

better to be specific, so we don't run into the same problem even we
are using the MSB of uint64_t for a pg state bit in future. we could,
however use uint64_t(-1) to indicate the pg_string_state()'s failure to
parse the state string, because pg_string_state() only translate a
single state a time. but it's always better to be explicit than
implicit.

Fixes: http://tracker.ceph.com/issues/21609
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 260f87a9f1c4e32ff3a596ea341ad07a901f44a9)

Conflicts:
src/mon/PGMap.cc
src/osd/osd_types.cc
src/osd/osd_types.h: trivial resolution
src/mon/PGMap.cc
src/osd/osd_types.cc
src/osd/osd_types.h