Eric Blake 89b6284fd9 snapshot: also support disks by path
I got confused when 'virsh domblkinfo dom disk' required the
path to a disk (which can be ambiguous, since a single file
can back multiple disks), rather than the unambiguous target
device name that I was using in disk snapshots.  So, in true
developer fashion, I went for the best of both worlds - all
interfaces that operate on a disk (aka block) now accept
either the target name or the unambiguous path to the backing
file used by the disk.

* src/conf/domain_conf.h (virDomainDiskIndexByName): Add
parameter.
(virDomainDiskPathByName): New prototype.
* src/libvirt_private.syms (domain_conf.h): Export it.
* src/conf/domain_conf.c (virDomainDiskIndexByName): Also allow
searching by path, and decide whether ambiguity is okay.
(virDomainDiskPathByName): New function.
(virDomainDiskRemoveByName, virDomainSnapshotAlignDisks): Update
callers.
* src/qemu/qemu_driver.c (qemudDomainBlockPeek)
(qemuDomainAttachDeviceConfig, qemuDomainUpdateDeviceConfig)
(qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise.
* src/qemu/qemu_process.c (qemuProcessFindDomainDiskByPath):
Likewise.
* src/libxl/libxl_driver.c (libxlDomainAttachDeviceDiskLive)
(libxlDomainDetachDeviceDiskLive, libxlDomainAttachDeviceConfig)
(libxlDomainUpdateDeviceConfig): Likewise.
* src/uml/uml_driver.c (umlDomainBlockPeek): Likewise.
* src/xen/xend_internal.c (xenDaemonDomainBlockPeek): Likewise.
* docs/formatsnapshot.html.in: Update documentation.
* tools/virsh.pod (domblkstat, domblkinfo): Likewise.
* docs/schemas/domaincommon.rng (diskTarget): Tighten pattern on
disk targets.
* docs/schemas/domainsnapshot.rng (disksnapshot): Update to match.
* tests/domainsnapshotxml2xmlin/disk_snapshot.xml: Update test.
2011-09-05 07:03:04 -06:00
..
2011-04-01 16:03:11 -06:00
2011-04-01 16:03:11 -06:00
2009-11-06 16:05:18 +01:00
2009-09-22 12:55:39 +02:00
2009-12-03 15:27:24 +01:00
2011-03-28 10:40:24 +08:00
2011-08-26 17:52:55 +02:00
2011-02-18 08:59:51 +01:00
2011-04-01 16:03:11 -06:00
2009-09-22 12:55:39 +02:00
2009-07-16 15:06:42 +02:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2009-04-15 20:42:50 +00:00
2011-08-11 13:42:22 -06:00
2011-04-01 16:03:11 -06:00
2011-08-03 11:02:42 +08:00
2009-07-29 09:04:21 +01:00
2011-01-28 08:44:05 -07:00
2011-05-11 08:18:04 -06:00
2011-04-01 16:03:11 -06:00