[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] virsh: extension of virsh attach-disk for rawio



On 02/02/2012 11:49 PM, Osier Yang wrote:
On 2012年02月03日 12:33, Taku Izumi wrote:

This patch extends "virsh attach-disk" command so that
we can specify "rawio" attribute.


Signed-off-by: Taku Izumi<izumi taku jp fujitsu com>
---
  tools/virsh.c   |    3 +++
  tools/virsh.pod |    3 ++-
  2 files changed, 5 insertions(+), 1 deletion(-)

Index: libvirt/tools/virsh.c
===================================================================
--- libvirt.orig/tools/virsh.c
+++ libvirt/tools/virsh.c
@@ -13883,6 +13883,7 @@ static const vshCmdOptDef opts_attach_di
{"sourcetype", VSH_OT_STRING, 0, N_("type of source (block|file)")},
      {"serial", VSH_OT_STRING, 0, N_("serial of disk device")},
      {"shareable", VSH_OT_BOOL, 0, N_("shareable between domains")},
+    {"rawio", VSH_OT_BOOL, 0, N_("needs rawio capability")},
      {"address", VSH_OT_STRING, 0, N_("address of disk device")},
      {"multifunction", VSH_OT_BOOL, 0,
       N_("use multifunction pci under specified address")},
@@ -14102,6 +14103,8 @@ cmdAttachDisk(vshControl *ctl, const vsh
                        (isFile) ? "file" : "block");
      if (type)
          virBufferAsprintf(&buf, " device='%s'", type);
+    if (vshCommandOptBool (cmd, "rawio"))
+        virBufferAddLit(&buf, " rawio='yes'");
      virBufferAddLit(&buf, ">\n");

      if (driver || subdriver)
Index: libvirt/tools/virsh.pod
===================================================================
--- libvirt.orig/tools/virsh.pod
+++ libvirt/tools/virsh.pod
@@ -1404,7 +1404,7 @@ the device does not use managed mode.
  =item B<attach-disk>  I<domain-id>  I<source>  I<target>
  [I<--driver driver>] [I<--subdriver subdriver>] [I<--cache cache>]
[I<--type type>] [I<--mode mode>] [I<--persistent>] [I<--sourcetype soucetype>]
-[I<--serial serial>] [I<--shareable>] [I<--address address>]
+[I<--serial serial>] [I<--shareable>] [I<--rawio>] [I<--address address>]
  [I<--multifunction>]

  Attach a new disk device to the domain.
@@ -1421,6 +1421,7 @@ I<cache>  can be one of "default", "none"
  "directsync" or "unsafe".
I<serial> is the serial of disk device. I<shareable> indicates the disk device
  is shareable between domains.
+I<rawio>  indicates the disk is needs rawio capability.

s/is needs/needs/

I<address> is the address of disk device in the form of pci:domain.bus.slot.function,
  scsi:controller.bus.unit or ide:controller.bus.unit.
I<multifunction> indicates specified pci address is a multifunction pci device



ACK with the nit fixed.

I fixed the nit and pushed.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]