]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/PGMap: let pg_string_state() return boost::optional<> 18218/head
authorKefu Chai <kchai@redhat.com>
Tue, 10 Oct 2017 12:32:08 +0000 (20:32 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 10 Oct 2017 12:41:48 +0000 (20:41 +0800)
commit260f87a9f1c4e32ff3a596ea341ad07a901f44a9
treef74782b958f7db4fa7004a82ba745a0d7154689b
parent90b9591c7d7d373bc1a742c608ab34119af40134
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>
src/mon/PGMap.cc
src/osd/osd_types.cc
src/osd/osd_types.h