All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 09/61] doc: Document driver-specific -blockdev options
Date: Fri, 23 Jun 2017 18:21:07 +0200	[thread overview]
Message-ID: <1498234919-27316-10-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1498234919-27316-1-git-send-email-kwolf@redhat.com>

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 <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
 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
+(file=@var{node-name}), or you define a new node inline, adding options
+for the referenced node after a dot (file.filename=@var{path},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
+@option{-device} 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
 
+@item Driver-specific options for @code{file}
+
+This is the protocol-level block driver for accessing regular files.
+
+@table @code
+@item filename
+The path to the image file in the local filesystem
+@item aio
+Specifies the AIO backend (threads/native, default: threads)
+@end table
+Example:
+@example
+-blockdev driver=file,node-name=disk,filename=disk.img
+@end example
+
+@item 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}.
+
+@table @code
+@item file
+Reference to or definition of the data source block driver node
+(e.g. a @code{file} driver node)
+@end table
+Example 1:
+@example
+-blockdev driver=file,node-name=disk_file,filename=disk.img
+-blockdev driver=raw,node-name=disk,file=disk_file
+@end example
+Example 2:
+@example
+-blockdev driver=raw,node-name=disk,file.driver=file,file.filename=disk.img
+@end example
+
+@item 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}.
+
+@table @code
+@item file
+Reference to or definition of the data source block driver node
+(e.g. a @code{file} driver node)
+
+@item 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.
+
+@item lazy-refcounts
+Whether to enable the lazy refcounts feature (on/off; default is taken from the
+image file)
+
+@item 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)
+
+@item l2-cache-size
+The maximum size of the L2 table cache in bytes
+(default: 4/5 of the total cache size)
+
+@item refcount-cache-size
+The maximum size of the refcount block cache in bytes
+(default: 1/5 of the total cache size)
+
+@item 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.
+
+@item 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)
+
+@item 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)
+
+@item 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)
+
+@item 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}.
+@end table
+
+Example 1:
+@example
+-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
+@end example
+Example 2:
+@example
+-blockdev driver=qcow2,node-name=disk,file.driver=http,file.filename=http://example.com/image.qcow2
+@end example
+
+@item 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

  parent reply	other threads:[~2017-06-23 16:22 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 16:20 [Qemu-devel] [PULL 00/61] Block layer patches Kevin Wolf
2017-06-23 16:20 ` [Qemu-devel] [PULL 01/61] commit: Fix completion with extra reference Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 02/61] qemu-iotests: Allow starting new qemu after cleanup Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 03/61] qemu-iotests: Test exiting qemu with running job Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 04/61] block: count bdrv_co_rw_vmstate() requests Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 05/61] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 06/61] migration: avoid recursive AioContext locking in save_vmstate() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 07/61] migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 08/61] doc: Document generic -blockdev options Kevin Wolf
2017-06-23 16:21 ` Kevin Wolf [this message]
2017-06-23 16:21 ` [Qemu-devel] [PULL 10/61] throttle: Update throttle-groups.c documentation Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 11/61] virtio-pci: use ioeventfd even when KVM is disabled Kevin Wolf
2017-06-28 10:11   ` [Qemu-devel] [Qemu-block] " QingFeng Hao
2017-06-28 10:22     ` Kevin Wolf
2017-06-28 13:07       ` QingFeng Hao
2017-07-03  6:01       ` QingFeng Hao
2017-06-23 16:21 ` [Qemu-devel] [PULL 12/61] migration: hold AioContext lock for loadvm qemu_fclose() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 13/61] qemu-iotests: 068: extract _qemu() function Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 14/61] qemu-iotests: 068: use -drive/-device instead of -hda Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 15/61] qemu-iotests: 068: test iothread mode Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 16/61] nvme: Add support for Read Data and Write Data in CMBs Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 17/61] qcow2: Remove unused Error variable in do_perform_cow() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 18/61] qcow2: Use unsigned int for both members of Qcow2COWRegion Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 19/61] qcow2: Make perform_cow() call do_perform_cow() twice Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 20/61] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 21/61] qcow2: Allow reading both COW regions with only one request Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 22/61] qcow2: Pass a QEMUIOVector to do_perform_cow_{read, write}() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 23/61] qcow2: Merge the writing of the COW regions with the guest data Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 24/61] qcow2: Use offset_into_cluster() and offset_to_l2_index() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 25/61] qed: Use bottom half to resume waiting requests Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 26/61] qed: Make qed_read_table() synchronous Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 27/61] qed: Remove callback from qed_read_table() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 28/61] qed: Remove callback from qed_read_l2_table() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 29/61] qed: Remove callback from qed_find_cluster() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 30/61] qed: Make qed_read_backing_file() synchronous Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 31/61] qed: Make qed_copy_from_backing_file() synchronous Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 32/61] qed: Remove callback from qed_copy_from_backing_file() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 33/61] qed: Make qed_write_header() synchronous Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 34/61] qed: Remove callback from qed_write_header() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 35/61] qed: Make qed_write_table() synchronous Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 36/61] qed: Remove GenericCB Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 37/61] qed: Remove callback from qed_write_table() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 38/61] qed: Make qed_aio_read_data() synchronous Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 39/61] qed: Make qed_aio_write_main() synchronous Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 40/61] qed: Inline qed_commit_l2_update() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 41/61] qed: Add return value to qed_aio_write_l1_update() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 42/61] qed: Add return value to qed_aio_write_l2_update() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 43/61] qed: Add return value to qed_aio_write_main() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 44/61] qed: Add return value to qed_aio_write_cow() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 45/61] qed: Add return value to qed_aio_write_inplace/alloc() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 46/61] qed: Add return value to qed_aio_read/write_data() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 47/61] qed: Remove ret argument from qed_aio_next_io() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 48/61] qed: Remove recursion in qed_aio_next_io() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 49/61] qed: Implement .bdrv_co_readv/writev Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 50/61] qed: Use CoQueue for serialising allocations Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 51/61] qed: Simplify request handling Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 52/61] qed: Use a coroutine for need_check_timer Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 53/61] qed: Add coroutine_fn to I/O path functions Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 54/61] qed: Use bdrv_co_* for coroutine_fns Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 55/61] block: Remove bdrv_aio_readv/writev/flush() Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 56/61] block: change variable names in BlockDriverState Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 57/61] fix: avoid an infinite loop or a dangling pointer problem in img_commit Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 58/61] blkdebug: Catch bs->exact_filename overflow Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 59/61] blkverify: " Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 60/61] block: Do not strcmp() with NULL uri->scheme Kevin Wolf
2017-06-23 16:21 ` [Qemu-devel] [PULL 61/61] qemu-img: don't shadow opts variable in img_dd() Kevin Wolf
2017-06-26 10:23 ` [Qemu-devel] [PULL 00/61] Block layer patches Peter Maydell
2017-06-26 10:26   ` Peter Maydell
2017-06-26 12:50   ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498234919-27316-10-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.