]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/AvlAllocator: use cbit for counting the order of alignment
authorKefu Chai <kchai@redhat.com>
Wed, 2 Jun 2021 08:31:18 +0000 (16:31 +0800)
committerMauricio Faria de Oliveira <mfo@canonical.com>
Wed, 10 Nov 2021 15:07:56 +0000 (12:07 -0300)
commitde1ae6434dbfbc245038d6c02933a7008a3ab870
tree92ef8d84ad6801ea91ec1e5f2fae1fd69882dcc8
parent52f340a7e5d1ce737b8bcb4de78eb24f122ca948
os/bluestore/AvlAllocator: use cbit for counting the order of alignment

no need to calculate the alignment first, cbits() would suffice. as it
counts the first set bit and the follow 0's in a number. the result
is identical to the cbit(alignment of that number).

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 573cbb796e8ba2f433caa308925735101a8161a6)
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
src/os/bluestore/AvlAllocator.cc