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