nbd: use an idr to keep track of nbd devices
authorJosef Bacik <jbacik@fb.com>
Wed, 1 Feb 2017 21:11:40 +0000 (16:11 -0500)
committerJens Axboe <axboe@fb.com>
Wed, 1 Feb 2017 23:28:08 +0000 (16:28 -0700)
commitb0d9111a2d53785847763c64c40af2d4c4c5a8b7
treec262f138c931d8e15b2581b6938c3868a6de5c27
parent124d6db07c3bd0bdb57ba0e22ff4e5b87e7cb32e
nbd: use an idr to keep track of nbd devices

To prepare for dynamically adding new nbd devices to the system switch
from using an array for the nbd devices and instead use an idr.  This
copies what loop does for keeping track of its devices.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nbd.c