qemu-patch-raspberry4/qga
Tomoki Sekiyama 46d4c5723e qga: Add guest-get-fsinfo command
Add command to get mounted filesystems information in the guest.
The returned value contains a list of mountpoint paths and
corresponding disks info such as disk bus type, drive address,
and the disk controllers' PCI addresses, so that management layer
such as libvirt can resolve the disk backends.

For example, when `lsblk' result is:

    NAME           MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    sdb              8:16   0    1G  0 disk
    `-sdb1           8:17   0 1024M  0 part
      `-vg0-lv0    253:1    0  1.4G  0 lvm  /mnt/test
    sdc              8:32   0    1G  0 disk
    `-sdc1           8:33   0  512M  0 part
      `-vg0-lv0    253:1    0  1.4G  0 lvm  /mnt/test
    vda            252:0    0   25G  0 disk
    `-vda1         252:1    0   25G  0 part /

where sdb is a SCSI disk with PCI controller 0000:00:0a.0 and ID=1,
      sdc is an IDE disk with PCI controller 0000:00:01.1, and
      vda is a virtio-blk disk with PCI device 0000:00:06.0,

guest-get-fsinfo command will return the following result:

    {"return":
     [{"name":"dm-1",
       "mountpoint":"/mnt/test",
       "disk":[
        {"bus-type":"scsi","bus":0,"unit":1,"target":0,
         "pci-controller":{"bus":0,"slot":10,"domain":0,"function":0}},
        {"bus-type":"ide","bus":0,"unit":0,"target":0,
         "pci-controller":{"bus":0,"slot":1,"domain":0,"function":1}}],
       "type":"xfs"},
      {"name":"vda1", "mountpoint":"/",
       "disk":[
        {"bus-type":"virtio","bus":0,"unit":0,"target":0,
         "pci-controller":{"bus":0,"slot":6,"domain":0,"function":0}}],
       "type":"ext4"}]}

In Linux guest, the disk information is resolved from sysfs. So far,
it only supports virtio-blk, virtio-scsi, IDE, SATA, SCSI disks on x86
hosts, and "disk" parameter may be empty for unsupported disk types.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>

*updated schema to report 2.2 as initial supported version

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-08-07 17:15:14 -05:00
..
vss-win32 vss-win32: Fix build with mingw64-headers-3.1.0 2014-04-07 14:39:19 -05:00
channel-posix.c qemu-ga: Handle errors uniformely in ga_channel_open() 2013-01-14 12:08:05 -06:00
channel-win32.c qemu-ga: isa-serial support on Windows 2014-02-23 18:38:18 -06:00
channel.h qemu-ga: move channel/transport functionality into wrapper class 2012-02-23 15:40:16 -06:00
commands-posix.c qga: Add guest-get-fsinfo command 2014-08-07 17:15:14 -05:00
commands-win32.c qga: Add guest-get-fsinfo command 2014-08-07 17:15:14 -05:00
commands.c qga: Consistently name Error ** objects errp, and not err 2014-05-09 09:11:26 -04:00
guest-agent-command-state.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
guest-agent-core.h qga: Fix compiler warnings (missing format attribute, wrong format strings) 2013-11-21 17:39:25 +01:00
main.c qga: Use return values instead of error_is_set(errp) 2014-05-09 09:11:30 -04:00
Makefile.objs qemu-ga: Call Windows VSS requester in fsfreeze command handler 2013-09-09 14:17:57 -05:00
qapi-schema.json qga: Add guest-get-fsinfo command 2014-08-07 17:15:14 -05:00
service-win32.c qga: escape cmdline args when registering win32 service (CVE-2013-2231) 2013-07-25 14:49:04 -05:00
service-win32.h qga: save state directory in ga_install_service() 2013-05-30 11:37:37 -05:00
vss-win32.c qga: Consistently name Error ** objects errp, and not err 2014-05-09 09:11:26 -04:00
vss-win32.h qga: Consistently name Error ** objects errp, and not err 2014-05-09 09:11:26 -04:00