qemu-block
[Top][All Lists]
Advanced

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

[Qemu-block] [PATCH RESEND v3 2/2] doc: Document driver-specific -blockd


From: Kevin Wolf
Subject: [Qemu-block] [PATCH RESEND v3 2/2] doc: Document driver-specific -blockdev options
Date: Fri, 16 Jun 2017 17:54:34 +0200

This documents the driver-specific options for the raw, qcow2 and file
block drivers for the man page. For everything else, we refer to the
QAPI documentation.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
 qemu-options.hx | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 114 insertions(+), 1 deletion(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index db20866..896ff17 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -614,7 +614,18 @@ STEXI
 @item -blockdev @var{option}[,@var{option}[,@var{option}[,...]]]
 @findex -blockdev
 
-Define a new block driver node.
+Define a new block driver node. Some of the options apply to all block drivers,
+other options are only accepted for a specific block driver. See below for a
+list of generic options and options for the most common block drivers.
+
+Options that expect a reference to another node (e.g. @code{file}) can be
+given in two ways. Either you specify the node name of an already existing node
+(address@hidden), or you define a new node inline, adding options
+for the referenced node after a dot (address@hidden,file.aio=native).
+
+A block driver node created with @option{-blockdev} can be used for a guest
+device by specifying its node name for the @code{drive} property in a
address@hidden argument that defines a block device.
 
 @table @option
 @item Valid options for any block driver node:
@@ -654,6 +665,108 @@ zero write commands. You may even choose "unmap" if 
@var{discard} is set
 to "unmap" to allow a zero write to be converted to an @code{unmap} operation.
 @end table
 
address@hidden Driver-specific options for @code{file}
+
+This is the protocol-level block driver for accessing regular files.
+
address@hidden @code
address@hidden filename
+The path to the image file in the local filesystem
address@hidden aio
+Specifies the AIO backend (threads/native, default: threads)
address@hidden table
+Example:
address@hidden
+-blockdev driver=file,node-name=disk,filename=disk.img
address@hidden example
+
address@hidden Driver-specific options for @code{raw}
+
+This is the image format block driver for raw images. It is usually
+stacked on top of a protocol level block driver such as @code{file}.
+
address@hidden @code
address@hidden file
+Reference to or definition of the data source block driver node
+(e.g. a @code{file} driver node)
address@hidden table
+Example 1:
address@hidden
+-blockdev driver=file,node-name=disk_file,filename=disk.img
+-blockdev driver=raw,node-name=disk,file=disk_file
address@hidden example
+Example 2:
address@hidden
+-blockdev driver=raw,node-name=disk,file.driver=file,file.filename=disk.img
address@hidden example
+
address@hidden Driver-specific options for @code{qcow2}
+
+This is the image format block driver for qcow2 images. It is usually
+stacked on top of a protocol level block driver such as @code{file}.
+
address@hidden @code
address@hidden file
+Reference to or definition of the data source block driver node
+(e.g. a @code{file} driver node)
+
address@hidden backing
+Reference to or definition of the backing file block device (default is taken
+from the image file). It is allowed to pass an empty string here in order to
+disable the default backing file.
+
address@hidden lazy-refcounts
+Whether to enable the lazy refcounts feature (on/off; default is taken from the
+image file)
+
address@hidden cache-size
+The maximum total size of the L2 table and refcount block caches in bytes
+(default: 1048576 bytes or 8 clusters, whichever is larger)
+
address@hidden l2-cache-size
+The maximum size of the L2 table cache in bytes
+(default: 4/5 of the total cache size)
+
address@hidden refcount-cache-size
+The maximum size of the refcount block cache in bytes
+(default: 1/5 of the total cache size)
+
address@hidden cache-clean-interval
+Clean unused entries in the L2 and refcount caches. The interval is in seconds.
+The default value is 0 and it disables this feature.
+
address@hidden pass-discard-request
+Whether discard requests to the qcow2 device should be forwarded to the data
+source (on/off; default: on if discard=unmap is specified, off otherwise)
+
address@hidden pass-discard-snapshot
+Whether discard requests for the data source should be issued when a snapshot
+operation (e.g. deleting a snapshot) frees clusters in the qcow2 file (on/off;
+default: on)
+
address@hidden pass-discard-other
+Whether discard requests for the data source should be issued on other
+occasions where a cluster gets freed (on/off; default: off)
+
address@hidden overlap-check
+Which overlap checks to perform for writes to the image
+(none/constant/cached/all; default: cached). For details or finer
+granularity control refer to the QAPI documentation of @code{blockdev-add}.
address@hidden table
+
+Example 1:
address@hidden
+-blockdev driver=file,node-name=my_file,filename=/tmp/disk.qcow2
+-blockdev 
driver=qcow2,node-name=hda,file=my_file,overlap-check=none,cache-size=16777216
address@hidden example
+Example 2:
address@hidden
+-blockdev 
driver=qcow2,node-name=disk,file.driver=http,file.filename=http://example.com/image.qcow2
address@hidden example
+
address@hidden Driver-specific options for other drivers
+Please refer to the QAPI documentation of the @code{blockdev-add} QMP command.
+
 @end table
 
 ETEXI
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]