On 05/14/2018 06:41 AM, Peter Krempa wrote:
Everything can be disabled by not using the parent element.
There's no
need to store this explicitly. Additionally it does not add any value
since any configuration is dropped if enabled='no' is configured.
Drop the attribute and adjust the code accordingly.t
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/formatdomain.html.in | 21 ++--
docs/schemas/storagecommon.rng | 3 -
src/util/virstoragefile.c | 117 +++++++++------------
src/util/virstoragefile.h | 1 -
.../disk-virtio-scsi-reservations.xml | 4 +-
5 files changed, 59 insertions(+), 87 deletions(-)
As I've worked may way forward - I reread the docs and needed to return
here for commenting...
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 80172c18d0..d69a669259 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2583,7 +2583,7 @@
<disk type='block' device='lun'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sda'>
- <reservations enabled='yes' managed='no'>
+ <reservations managed='no'>
<source type='unix' path='/path/to/qemu-pr-helper'
mode='client'/>
</reservations>
<target dev='sda' bus='scsi'/>
@@ -2952,17 +2952,16 @@
<dd><span class="since">Since libvirt
4.4.0</span>, the
<code>reservations</code> can be a sub-element of the
<code>source</code> element for storage sources (QEMU driver
only).
- If present (and enabled) it enables persistent reservations for SCSI
+ If present it enables persistent reservations for SCSI
based disks. The element has one mandatory attribute
- <code>enabled</code> with accepted values
<code>yes</code> and
- <code>no</code>. If the feature is enabled, then there's
another
- mandatory attribute <code>managed</code> (accepted values are
the
- same as for <code>enabled</code>) that enables or disables
libvirt
- spawning a helper process. When the PR is unmanaged, then hypervisor
- acts as a client and path to server socket must be provided in child
- element <code>source</code>, which currently accepts only the
- following attributes: <code>type</code> with one value
- <code>unix</code>, <code>path</code> with path the
socket, and
+ <code>managed</code> with accepted values
<code>yes</code> and
+ <code>no</code>. If <code>managed</code> is enabled
libvirt prepares
+ and manages any resources needed for the feature. When the PR is
s/for the feature././
s/PR is/persistent reservations are/
+ unmanaged, then hypervisor acts as a client and path to
server
s/then/then the/
s/and path to server/and the path to the server/
+ socket must be provided in child element
<code>source</code>,
s/in child/in the child/
+ which currently accepts only the following attributes:
+ <code>type</code> with one value <code>unix</code>,
+ <code>path</code> with path the socket, and
s/with path the socket/path to the socket/
finally <code>mode</code> which accepts one
value
<code>client</code> and specifies the role of hypervisor.
s/and specifies/specifying
It's recommended to allow libvirt manage the
persistent
John
[...]