• Ilya Dryomov's avatar
    rbd: switch to ida for rbd id assignments · f8a22fc2
    Ilya Dryomov authored
    Currently rbd ids are allocated using an atomic variable that keeps
    track of the highest id currently in use and each new id is simply one
    more than the value of that variable.  That's nice and cheap, but it
    does mean that rbd ids are allowed to grow boundlessly, and, more
    importantly, it's completely unpredictable.  So, in preparation for
    single-major device number allocation scheme, which is going to
    establish and rely on a constant mapping between rbd ids and device
    numbers, switch to ida for rbd id assignments.
    Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
    Reviewed-by: default avatarAlex Elder <elder@linaro.org>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    f8a22fc2
rbd.c 135 KB