Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/PGMap: let pg_string_state() return boost::optional<> #18218

Merged
merged 2 commits into from Oct 11, 2017

Conversation

Projects
None yet
3 participants
@tchaikov
Copy link
Contributor

commented Oct 10, 2017

this is a follow-up of #18058, which is halfway to uint64_t pg state.

tchaikov added some commits Oct 10, 2017

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>
mon/PGMap: use uint64_t for pg state
Signed-off-by: Kefu Chai <kchai@redhat.com>
@Yan-waller

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2017

@tchaikov thanks for catching this.

@tchaikov tchaikov merged commit 9507282 into ceph:master Oct 11, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@tchaikov tchaikov deleted the tchaikov:wip-21609 branch Oct 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.