]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: add pg_pool_t::get_pg_num_divisor
authorSage Weil <sage@inktank.com>
Mon, 20 Jan 2014 18:28:43 +0000 (10:28 -0800)
committerSage Weil <sage@inktank.com>
Sun, 16 Feb 2014 06:08:12 +0000 (22:08 -0800)
commite65c280b0e4f4ef7bbb4542b21c4ef67f6ee188d
treecb8c8e3224ec18d7f8812b41d47c091267747a47
parent95f25ce092b2f17a4941e81464a8bf9a37585455
osd: add pg_pool_t::get_pg_num_divisor

A PG is not always an equally sized fraction of the total pool size due to
the use of ceph_stable_mod.  Add a helper to return the fraction
(denominator) of a given pg based on the current pg_num value.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/osd_types.cc
src/osd/osd_types.h
src/test/test_osd_types.cc