[libvirt] [RFC PATCH 0/5] Support online resizing of block devices.

Osier Yang jyang at redhat.com
Tue Jul 26 05:51:07 UTC 2011


This patch series introduce new API "virDomainBlockResize" to expose
qemu monitor command "block_size", which is for resizing the a block
device while the domain is running.

The prototype for the new API is:

    int
    virDomainBlockResize (virDomainPtr dom,
                          const char *path,
                          unsigned long long size,
                          unsigned int flags)

    * "@path" is the absolute path of the block device, which can be
      extraced from domain xml.

    * The units for "@size" is kilobytes, which might be not quite properly.
      (qemu HMP uses Megabytes as the default units, QMP uses Bytes as the
       default units, so it means we need to divice "@size" by 1024 for HMP,
       and multiply "@size" by 1024 for QMP. On the other hand, we need to
       check the overflowing). Any ideas on this is welcomed.

    * "@flags" is unused currently.

[PATCH 1/5] block_resize: Define the new API
[PATCH 2/5] block_resize: Wire up the remote protocol
[PATCH 3/5] block_resize: Implement qemu monitor functions
[PATCH 4/5] block_resize: Implement qemu driver method
[PATCH 5/5] block_resize: Expose the new API to virsh




More information about the libvir-list mailing list