]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-nbd: fix unused nbd device search bug in container 19051/head
authorLi Wang <laurence.liwang@gmail.com>
Wed, 1 Nov 2017 09:21:29 +0000 (09:21 +0000)
committerShinobu Kinjo <shinobu@redhat.com>
Mon, 20 Nov 2017 20:06:09 +0000 (05:06 +0900)
commit2d9aafe1bc07cfa65e1bd3d5ea28b575a15eaf53
treec402fdd8832fedbccbf3698f337a1d61fa403aef
parent210b826ff06fd145f730e2b5303e6472d82fd8e5
rbd-nbd: fix unused nbd device search bug in container

In some container scenarios, the host may choose to
map a specific nbd device, for example, /dev/nbd6 into the
container, in that case, the nbd device available in the
container is not numbered from 0. The current unused
nbd device search function will return no result.
This patch fixes it.

Fixes: http://tracker.ceph.com/issues/22012
Signed-off-by: Li Wang <laurence.liwang@gmail.com>
Reviewed-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
(cherry picked from commit be0f9581f9727187ca03232e0b368e7da7a60609)
src/tools/rbd_nbd/rbd-nbd.cc