Skip to content
Commit a0eda625 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Jens Axboe
Browse files

virtio-blk: use ida to allocate disk index



Based on a patch by Mark Wu <dwu@redhat.com>

Current index allocation in virtio-blk is based on a monotonically
increasing variable "index". This means we'll run out of numbers
after a while.  It also could cause confusion about the disk
name in the case of hot-plugging disks.
Change virtio-blk to use ida to allocate index, instead.

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c4853efe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment