These patches allow keys to be passed to rbd devices for authentication via the same interface that qcow uses for encryption - the monitor block_passwd command.
Since rbd cannot read anything from the cluster before authenticating, the size of the device is unknown until the key is set. At this point, the size can be refreshed as if the device were resized. This works fine with the virtio driver, but other drivers, like ide, don't implement the resize callback. What do you think is the best way to solve this? Josh Durgin (2): block: let bdrv_set_key be used for authentication rbd: implement bdrv_set_key block.c | 27 +++++++--- block.h | 2 +- block/rbd.c | 160 ++++++++++++++++++++++++++++++++++++++---------------- block_int.h | 3 +- blockdev.c | 3 +- hmp-commands.hx | 6 +- monitor.c | 13 +++-- qapi-schema.json | 7 ++- qemu-img.c | 4 +- qerror.c | 16 +++--- qerror.h | 12 ++-- qmp-commands.hx | 6 ++- 12 files changed, 172 insertions(+), 87 deletions(-)