]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: ROUND_UP_TO accepts any rounding factor 2328/head
authorLoic Dachary <loic-201408@dachary.org>
Mon, 25 Aug 2014 15:05:04 +0000 (17:05 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Tue, 26 Aug 2014 10:07:38 +0000 (12:07 +0200)
commit87cd3a8f6e190aed06e361595afc4ec83148da98
tree9f5ca49c9e663fa9f4f9e39756f59f8884efc178
parent4bff6f3476e5df400db3dc1f0ad7b35a2a41830e
common: ROUND_UP_TO accepts any rounding factor

The ROUND_UP_TO function was limited to rounding factors that are powers
of two. This saves a modulo but it is not used where it would make a
difference. The implementation is changed so it is generic.

http://tracker.ceph.com/issues/9209 Fixes: #9209

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 9449520b121fc6ce0c64948386d4ff77f46f4f5f)
src/include/intarith.h