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: OSDMonitor: fix the check error of pg creating #10916

Merged
merged 1 commit into from Oct 10, 2016
Merged

mon: OSDMonitor: fix the check error of pg creating #10916

merged 1 commit into from Oct 10, 2016

Commits on Sep 19, 2016

  1. mon: OSDMonitor: fix the check error of pg creating

    The variable 'pgs_per_osd' set value from 'new_pgs' divided by 'expected_osds',
    and its type is integer. So it would remove the decimal point and get smaller value.
    This would have problem in some situations, for exmaple:
    
    The limitation of pg creating for one OSD is '32'.
    There have 3 OSDs and I want to increase pgs for a pool.
    It should be the limitation for creating new pgs up to '96(32 * 3)' at once.
    Now, I create '98' pgs for a pool.
    
    In original code, '98' would be divided by 'expected_osds' and get the floating value '32....'
    Because of the type which is integer, the 'pgs_per_osd' would be set to 32.
    Then the value won't bigger than the limitation and get the wrong result.
    
    Signed-off-by: DesmondS <desmond.s@inwinstack.com>
    Fixes: http://tracker.ceph.com/issues/17169
    desmondshih committed Sep 19, 2016
    Copy the full SHA
    179d3d1 View commit details
    Browse the repository at this point in the history