mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
block: add -drive copy-on-read=on|off
This patch adds the -drive copy-on-read=on|off command-line option: copy-on-read=on|off copy-on-read is "on" or "off" and enables whether to copy read backing file sectors into the image file. Copy-on-read avoids accessing the same backing file sectors repeatedly and is useful when the backing file is over a slow network. By default copy-on-read is off. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
ab1859218a
commit
fb0490f69f
4 changed files with 21 additions and 3 deletions
|
@ -109,6 +109,10 @@ static QemuOptsList qemu_drive_opts = {
|
|||
.name = "bps_wr",
|
||||
.type = QEMU_OPT_NUMBER,
|
||||
.help = "limit write bytes per second",
|
||||
},{
|
||||
.name = "copy-on-read",
|
||||
.type = QEMU_OPT_BOOL,
|
||||
.help = "copy read data from backing file into image file",
|
||||
},
|
||||
{ /* end of list */ }
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue