]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
krbd: rewrite "already mapped" code
authorIlya Dryomov <idryomov@gmail.com>
Thu, 7 Sep 2017 14:05:20 +0000 (16:05 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 11 Sep 2017 09:34:25 +0000 (11:34 +0200)
commit69c6f139a7202713e01b04024ddefe8019d50efd
tree2e2d6d9e15e3dcb20eec67fb9b52ccfd871d1a08
parent9e9598dbf4f166ce347684e0aab354d05e9b3ee4
krbd: rewrite "already mapped" code

The "already mapped" code, introduced in commit d6a66fc8f49b ("rbd:
before rbd map, warn if the image is already mapped") is broken:
because of a use-after-free on attribute strings, the warning isn't
even printed half the time.

Rewrite making use of udev enumeration filters and fix the interface
while at it.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/include/krbd.h
src/krbd.cc
src/tools/rbd/action/Kernel.cc