rbd: switch to ida for rbd id assignments
authorIlya Dryomov <ilya.dryomov@inktank.com>
Fri, 13 Dec 2013 13:28:57 +0000 (15:28 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 31 Dec 2013 18:31:56 +0000 (20:31 +0200)
commitf8a22fc238a449ff982bfb40e30c3f3c9c90a08a
tree040d38a199ab4ad0e9814a4826e58f0f2725c374
parente1b4d96dea61c3078775090e8b121f571aab8fda
rbd: switch to ida for rbd id assignments

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: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c
This page took 0.036189 seconds and 5 git commands to generate.