Re: [PATCH v4] Add new attribute wrpolicy to <driver> element

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

 



On 01/17/2012 05:44 AM, Deepak C Shetty wrote:
> This introduces new attribute wrpolicy with only supported
> value as immediate. This will be an optional
> attribute with no defaults. This helps specify whether
> to skip the host page cache.
> 
> When wrpolicy is specified, meaning when wrpolicy=immediate
> a writeback is explicitly initiated for the dirty pages in
> the host page cache as part of the guest file write operation.
> 
> Usage:
> <filesystem type='mount' accessmode='passthrough'>
>   <driver type='path' wrpolicy='immediate'/>
>   <source dir='/export/to/guest'/>
>   <target dir='mount_tag'/>
> </filesystem>
> 
> Currently this only works with type='mount' for the QEMU/KVM driver.
> 
> Signed-off-by: Deepak C Shetty <deepakcs@xxxxxxxxxxxxxxxxxx>

You had lots of trailing whitespace, caught by 'make syntax-check'.

> +++ b/src/qemu/qemu_capabilities.c
> @@ -148,6 +148,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
>                "virtio-blk-pci.scsi",
>                "blk-sg-io",
>                "drive-copy-on-read",
> +              "fsdev-writeout", 

Trivial merge conflict here; nothing too hard to figure out.

> +++ b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.args
> @@ -4,10 +4,10 @@ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda \
>  /dev/HostVG/QEMUGuest1 -fsdev local,security_model=passthrough,id=fsdev-fs0,\
>  path=/export/to/guest -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,\
>  mount_tag=/import/from/host,bus=pci.0,addr=0x3 \
> --fsdev local,security_model=mapped,id=fsdev-fs1,\
> +-fsdev local,security_model=mapped,writeout=immediate,id=fsdev-fs1,\
>  path=/export/to/guest2 -device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,\

Excellent - that's what I was looking for in an added test.

ACK after fixing up the whitespace and one other test failure, so I
pushed with this squashed in:

diff --git i/docs/formatdomain.html.in w/docs/formatdomain.html.in
index 1d6484a..de9b480 100644
--- i/docs/formatdomain.html.in
+++ w/docs/formatdomain.html.in
@@ -1424,10 +1424,10 @@
         attribute <code>type='path'</code>
         or <code>type='handle'</code> <span class="since">(since
         0.9.7)</span>. The driver block has an optional attribute
-        <code>wrpolicy</code> that further controls interaction with
-        the host page cache; omitting the attribute gives default
behavior,
-        while the value <code>immediate</code> means that a host writeback
-        is immediately triggered for all pages touched during a guest file
+        <code>wrpolicy</code> that further controls interaction with
+        the host page cache; omitting the attribute gives default behavior,
+        while the value <code>immediate</code> means that a host writeback
+        is immediately triggered for all pages touched during a guest file
         write operation <span class="since">(since 0.9.10)</span>.
         </dd>
         <dt><code>type='template'</code></dt>
diff --git i/src/conf/domain_conf.c w/src/conf/domain_conf.c
index 28f9b1b..f97014e 100644
--- i/src/conf/domain_conf.c
+++ w/src/conf/domain_conf.c
@@ -10210,7 +10210,6 @@ virDomainFSDefFormat(virBufferPtr buf,
         }

         virBufferAddLit(buf, "/>\n");
-
     }

     if (def->src) {
diff --git i/tests/qemuhelptest.c w/tests/qemuhelptest.c
index 164707d..8802271 100644
--- i/tests/qemuhelptest.c
+++ w/tests/qemuhelptest.c
@@ -666,7 +666,8 @@ mymain(void)
             QEMU_CAPS_FSDEV_READONLY,
             QEMU_CAPS_VIRTIO_BLK_SCSI,
             QEMU_CAPS_VIRTIO_BLK_SG_IO,
-            QEMU_CAPS_CPU_HOST);
+            QEMU_CAPS_CPU_HOST,
+            QEMU_CAPS_FSDEV_WRITEOUT);

     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }


-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]