* [Qemu-devel] [PATCH v7 1/3] qemu-img.texi: Clean up parameter list
2018-02-09 5:29 [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Fam Zheng
@ 2018-02-09 5:29 ` Fam Zheng
2018-02-09 5:29 ` [Qemu-devel] [PATCH v7 2/3] qemu-img: Document --force-share / -U Fam Zheng
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Fam Zheng @ 2018-02-09 5:29 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, qemu-block, kchamart, eblake, Kevin Wolf, Max Reitz
Split options out of the "@table @var" section and create a "@table
@option", then use whitespaces and blank lines consistently.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
qemu-img.texi | 66 +++++++++++++++++++++++++++++++++++------------------------
1 file changed, 39 insertions(+), 27 deletions(-)
diff --git a/qemu-img.texi b/qemu-img.texi
index fdcf120f36..60a0e080c6 100644
--- a/qemu-img.texi
+++ b/qemu-img.texi
@@ -33,38 +33,14 @@ The following commands are supported:
Command parameters:
@table @var
+
@item filename
- is a disk image filename
-
-@item --object @var{objectdef}
-
-is a QEMU user creatable object definition. See the @code{qemu(1)} manual
-page for a description of the object properties. The most common object
-type is a @code{secret}, which is used to supply passwords and/or encryption
-keys.
-
-@item --image-opts
-
-Indicates that the source @var{filename} parameter is to be interpreted as a
-full option string, not a plain filename. This parameter is mutually
-exclusive with the @var{-f} parameter.
-
-@item --target-image-opts
-
-Indicates that the @var{output_filename} parameter(s) are to be interpreted as
-a full option string, not a plain filename. This parameter is mutually
-exclusive with the @var{-O} parameters. It is currently required to also use
-the @var{-n} parameter to skip image creation. This restriction may be relaxed
-in a future release.
+is a disk image filename
@item fmt
is the disk image format. It is guessed automatically in most cases. See below
for a description of the supported disk formats.
-@item --backing-chain
-will enumerate information about backing files in a disk image chain. Refer
-below for further description.
-
@item size
is the disk image size in bytes. Optional suffixes @code{k} or @code{K}
(kilobyte, 1024) @code{M} (megabyte, 1024k) and @code{G} (gigabyte, 1024M)
@@ -74,42 +50,78 @@ and T (terabyte, 1024G) are supported. @code{b} is ignored.
is the destination disk image filename
@item output_fmt
- is the destination format
+is the destination format
+
@item options
is a comma separated list of format specific options in a
name=value format. Use @code{-o ?} for an overview of the options supported
by the used format or see the format descriptions below for details.
+
@item snapshot_param
is param used for internal snapshot, format is
'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
+
@item snapshot_id_or_name
is deprecated, use snapshot_param instead
+@end table
+
+@table @option
+
+@item --object @var{objectdef}
+is a QEMU user creatable object definition. See the @code{qemu(1)} manual
+page for a description of the object properties. The most common object
+type is a @code{secret}, which is used to supply passwords and/or encryption
+keys.
+
+@item --image-opts
+Indicates that the source @var{filename} parameter is to be interpreted as a
+full option string, not a plain filename. This parameter is mutually
+exclusive with the @var{-f} parameter.
+
+@item --target-image-opts
+Indicates that the @var{output_filename} parameter(s) are to be interpreted as
+a full option string, not a plain filename. This parameter is mutually
+exclusive with the @var{-O} parameters. It is currently required to also use
+the @var{-n} parameter to skip image creation. This restriction may be relaxed
+in a future release.
+
+@item --backing-chain
+will enumerate information about backing files in a disk image chain. Refer
+below for further description.
+
@item -c
indicates that target image must be compressed (qcow format only)
+
@item -h
with or without a command shows help and lists the supported formats
+
@item -p
display progress bar (compare, convert and rebase commands only).
If the @var{-p} option is not used for a command that supports it, the
progress is reported when the process receives a @code{SIGUSR1} or
@code{SIGINFO} signal.
+
@item -q
Quiet mode - do not print any output (except errors). There's no progress bar
in case both @var{-q} and @var{-p} options are used.
+
@item -S @var{size}
indicates the consecutive number of bytes that must contain only zeros
for qemu-img to create a sparse image during conversion. This value is rounded
down to the nearest 512 bytes. You may use the common size suffixes like
@code{k} for kilobytes.
+
@item -t @var{cache}
specifies the cache mode that should be used with the (destination) file. See
the documentation of the emulator's @code{-drive cache=...} option for allowed
values.
+
@item -T @var{src_cache}
specifies the cache mode that should be used with the source file(s). See
the documentation of the emulator's @code{-drive cache=...} option for allowed
values.
+
@end table
Parameters to snapshot subcommand:
--
2.14.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH v7 2/3] qemu-img: Document --force-share / -U
2018-02-09 5:29 [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Fam Zheng
2018-02-09 5:29 ` [Qemu-devel] [PATCH v7 1/3] qemu-img.texi: Clean up parameter list Fam Zheng
@ 2018-02-09 5:29 ` Fam Zheng
2018-02-09 5:29 ` [Qemu-devel] [PATCH v7 3/3] docs: Document share-rw property more thoroughly Fam Zheng
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Fam Zheng @ 2018-02-09 5:29 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, qemu-block, kchamart, eblake, Kevin Wolf, Max Reitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
qemu-img.texi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/qemu-img.texi b/qemu-img.texi
index 60a0e080c6..8a26400adb 100644
--- a/qemu-img.texi
+++ b/qemu-img.texi
@@ -86,6 +86,14 @@ exclusive with the @var{-O} parameters. It is currently required to also use
the @var{-n} parameter to skip image creation. This restriction may be relaxed
in a future release.
+@item --force-share (-U)
+If specified, @code{qemu-img} will open the image in shared mode, allowing
+other QEMU processes to open it in write mode. For example, this can be used to
+get the image information (with 'info' subcommand) when the image is used by a
+running guest. Note that this could produce inconsistent results because of
+concurrent metadata changes, etc. This option is only allowed when opening
+images in read-only mode.
+
@item --backing-chain
will enumerate information about backing files in a disk image chain. Refer
below for further description.
--
2.14.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH v7 3/3] docs: Document share-rw property more thoroughly
2018-02-09 5:29 [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Fam Zheng
2018-02-09 5:29 ` [Qemu-devel] [PATCH v7 1/3] qemu-img.texi: Clean up parameter list Fam Zheng
2018-02-09 5:29 ` [Qemu-devel] [PATCH v7 2/3] qemu-img: Document --force-share / -U Fam Zheng
@ 2018-02-09 5:29 ` Fam Zheng
2018-02-09 10:14 ` [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Stefan Hajnoczi
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Fam Zheng @ 2018-02-09 5:29 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, qemu-block, kchamart, eblake, Kevin Wolf, Max Reitz
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
docs/qemu-block-drivers.texi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/docs/qemu-block-drivers.texi b/docs/qemu-block-drivers.texi
index cd74767ed3..f1793692bb 100644
--- a/docs/qemu-block-drivers.texi
+++ b/docs/qemu-block-drivers.texi
@@ -845,6 +845,16 @@ QEMU transparently handles lock handover during shared storage migration. For
shared virtual disk images between multiple VMs, the "share-rw" device option
should be used.
+By default, the guest has exclusive write access to its disk image. If the
+guest can safely share the disk image with other writers the @code{-device
+...,share-rw=on} parameter can be used. This is only safe if the guest is
+running software, such as a cluster file system, that coordinates disk accesses
+to avoid corruption.
+
+Note that share-rw=on only declares the guest's ability to share the disk.
+Some QEMU features, such as image file formats, require exclusive write access
+to the disk image and this is unaffected by the share-rw=on option.
+
Alternatively, locking can be fully disabled by "locking=off" block device
option. In the command line, the option is usually in the form of
"file.locking=off" as the protocol driver is normally placed as a "file" child
--
2.14.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U
2018-02-09 5:29 [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Fam Zheng
` (2 preceding siblings ...)
2018-02-09 5:29 ` [Qemu-devel] [PATCH v7 3/3] docs: Document share-rw property more thoroughly Fam Zheng
@ 2018-02-09 10:14 ` Stefan Hajnoczi
2018-02-09 13:58 ` Kashyap Chamarthy
2018-02-09 14:47 ` Kevin Wolf
5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2018-02-09 10:14 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, qemu-block, kchamart, eblake, Kevin Wolf, Max Reitz
[-- Attachment #1: Type: text/plain, Size: 752 bytes --]
On Fri, Feb 09, 2018 at 01:29:12PM +0800, Fam Zheng wrote:
> v7: Tweak wording again "allowing concurrent writers" -> "allowing other QEMU
> processes to open it in write mode". [Eric, Stefan, Kevin]
> Add patch to document share-rw. [Stefan]
>
> v6: Tweak wording ("concurrent writers"). [Max]
>
> Fam Zheng (3):
> qemu-img.texi: Clean up parameter list
> qemu-img: Document --force-share / -U
> docs: Document share-rw property more thoroughly
>
> docs/qemu-block-drivers.texi | 10 ++++++
> qemu-img.texi | 74 ++++++++++++++++++++++++++++----------------
> 2 files changed, 57 insertions(+), 27 deletions(-)
Nice, thanks for being persistent!
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U
2018-02-09 5:29 [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Fam Zheng
` (3 preceding siblings ...)
2018-02-09 10:14 ` [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Stefan Hajnoczi
@ 2018-02-09 13:58 ` Kashyap Chamarthy
2018-02-09 14:47 ` Kevin Wolf
5 siblings, 0 replies; 7+ messages in thread
From: Kashyap Chamarthy @ 2018-02-09 13:58 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, stefanha, qemu-block, eblake, Kevin Wolf, Max Reitz
On Fri, Feb 09, 2018 at 01:29:12PM +0800, Fam Zheng wrote:
> v7: Tweak wording again "allowing concurrent writers" -> "allowing other QEMU
> processes to open it in write mode". [Eric, Stefan, Kevin]
> Add patch to document share-rw. [Stefan]
>
> v6: Tweak wording ("concurrent writers"). [Max]
>
> Fam Zheng (3):
> qemu-img.texi: Clean up parameter list
> qemu-img: Document --force-share / -U
> docs: Document share-rw property more thoroughly
>
> docs/qemu-block-drivers.texi | 10 ++++++
> qemu-img.texi | 74 ++++++++++++++++++++++++++++----------------
> 2 files changed, 57 insertions(+), 27 deletions(-)
Thanks!
Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>
--
/kashyap
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U
2018-02-09 5:29 [Qemu-devel] [PATCH v7 0/3] qemu-img: Document --force-share / -U Fam Zheng
` (4 preceding siblings ...)
2018-02-09 13:58 ` Kashyap Chamarthy
@ 2018-02-09 14:47 ` Kevin Wolf
5 siblings, 0 replies; 7+ messages in thread
From: Kevin Wolf @ 2018-02-09 14:47 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, stefanha, qemu-block, kchamart, eblake, Max Reitz
Am 09.02.2018 um 06:29 hat Fam Zheng geschrieben:
> v7: Tweak wording again "allowing concurrent writers" -> "allowing other QEMU
> processes to open it in write mode". [Eric, Stefan, Kevin]
> Add patch to document share-rw. [Stefan]
>
> v6: Tweak wording ("concurrent writers"). [Max]
>
> Fam Zheng (3):
> qemu-img.texi: Clean up parameter list
> qemu-img: Document --force-share / -U
> docs: Document share-rw property more thoroughly
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 7+ messages in thread