packaging: enable curl block device backend
packaging: enable ssh block device backend
[PATCH] block/curl: Add support for Secure Shell (ssh/sftp) block device.

 qemu-system-x86_64 -drive file=sftp://address@hidden/some/image

QEMU will ssh into 'hostname' as 'user' and open '/some/image' which
is made available as a standard block device.

You must specify a 'user@' in the URL.

The server just requires a regular ssh daemon with sftp-server
support.  Most ssh daemons on Unix/Linux systems will work out of the
box.

This is implemented using curl (using libssh2 underneath).
io-mirror: add stubs for remote fd block device backend
[live snapshot] fix warning results from migration.h
io-mirrir: implement tcp proxy block backend stub

This backend can be used to route io requests to a tcp proxy along
with drive-mirror.

This commit implements the required stubs for a qemu block backend.

Full implementations will be added later.

Usage:

1. launch a vm with qmp service attached

2. connect to the qmp server via qmp-shell
Welcome to the QMP low-level shell!
Connected to QEMU 1.4.50

3. issue drive-mirror command from drive0 to a tcp proxy.
(QEMU) drive-mirror device=drive0 target=tcp://root/a.img sync=full format=tcp
{u'return': {}}

4. with this commit, debug messages like below will be shown:

tcp: bdrv_tcp_init   initializing tcp block device.
QEMU waiting for connection on: tcp:127.0.0.1:4444,server
[New Thread 0x7fffeed62700 (LWP 9186)]
[New Thread 0x7fffee17e700 (LWP 9187)]
[New Thread 0x7fffed97d700 (LWP 9188)]
[New Thread 0x7fffecbff700 (LWP 9189)]
Unknown option 'size'
Formatting 'tcp://root/a.img', fmt=tcp
tcp: tcp_create_stub creating tcp block device.
tcp: tcp_parse_filename_stub parsing tcp block device uri.
tcp: tcp_open_stub   opening tcp block device.
tcp: tcp_getlength_stub get length of tcp block device.
[New Thread 0x7fff961fe700 (LWP 9191)]
[New Thread 0x7fff959fd700 (LWP 9192)]
tcp: tcp_co_writev_stub sector num: 0x11500,nsectors: 128

[New Thread 0x7fff951fc700 (LWP 9193)]
tcp: tcp_co_writev_stub sector num: 0x40000,nsectors: 128

tcp: tcp_co_writev_stub sector num: 0xc0000,nsectors: 128

[New Thread 0x7fff949fb700 (LWP 9194)]
tcp: tcp_co_writev_stub sector num: 0x240000,nsectors: 128

tcp: tcp_co_writev_stub sector num: 0x140000,nsectors: 128

tcp: tcp_co_writev_stub sector num: 0x1c0000,nsectors: 128
...