This series of patches adds the ability to take group live snapshots, as opposed to indvidual device snapshots. In addition, it adds the ability to pass an array input parameter to a QMP command, although without argument validation.
Currently, when taking live snapshots of devices, if a device fails then the snapshot command re-opens the original image. The problem with this approach is that if multiple devices need to have snapshots taken together, if any of the snapshots after the first device fails, then the devices are left in and inconsistent state with respect to each other (since some of them have been reverted to the original image, while others have not). This series introduces a new command to address this issue, which takes snapshots of a group of disks. An arbitrary number of disks may be passed in as a list / JSON array, and blockdev-group-snapshot-sync will take a snapshot of that group atomically (with respect to the command). If any disk fails the snapshot, then all disks in the group are reverted back to the original images. This allows the drives to remain consistent. Another command is also introduced, that will return a list of strings, each string corresponding to a filename of any failed image opens, including failure to reopen the original image. This list corresponds to the last invocation of the command blockdev-query-group-snapshot-failure; that is, it can be called any time after a group live snapshot, and see a list of all failed opens. If there were no failures, it returns an empty list. Jeff Cody (3): qapi: Allow QMP/QAPI commands to have array inputs qapi: Introduce blockdev-group-snapshot-sync command qapi: Introduce blockdev-query-group-snapshot-failure blockdev.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ monitor.c | 72 +++++++++++++++++++---- monitor.h | 1 + qapi-schema.json | 70 ++++++++++++++++++++++ qmp-commands.hx | 44 ++++++++++++++ 5 files changed, 345 insertions(+), 12 deletions(-) -- 1.7.9.rc2.1.g69204